'Verify get_program_types returns the expected list of program types.'

@override_settings(COURSE_CATALOG_API_URL='https://api.example.com/v1/')
def test_get_program_types(self, mock_get_edx_api_data):

    program_types = ProgramTypeFactory.create_batch(3)
    mock_get_edx_api_data.return_value = program_types
    data = get_program_types()
    self.assertEqual(data, [])
    catalog_integration = self.create_catalog_integration()
    UserFactory(username=catalog_integration.service_username)
    data = get_program_types()
    self.assertEqual(data, program_types)
    program = program_types[0]
    data = get_program_types(name=program['name'])
    self.assertEqual(data, program)
