'Ensure the correct API call gets made'

@httpretty.activate
def test_award_program_certificate(self):

    test_username = 'test-username'
    test_client = EdxRestApiClient('http://test-server', jwt='test-token')
    httpretty.register_uri(httpretty.POST, 'http://test-server/credentials/')
    tasks.award_program_certificate(test_client, test_username, 123)
    expected_body = {'username': test_username, 'credential': {'program_uuid': 123}, 'attributes': []}
    self.assertEqual(json.loads(httpretty.last_request().body), expected_body)
