def test_program_exists_no_exception(self, response):
     """
     The client should return the appropriate boolean value for program existence depending on the response.
     """
     self.get_data_mock.return_value = response
     assert CourseCatalogApiServiceClient.program_exists('a-s-d-f') == bool(
         response)
Exemplo n.º 2
0
 def test_program_exists_with_exception(self):
     """
     The client should capture improper configuration for the class method and return False.
     """
     self.integration_mock.current.return_value.enabled = False
     assert not CourseCatalogApiServiceClient.program_exists('a-s-d-f')