def setUp(self): super(FavoriteTest, self).setUp() self.adm_un = "admin" self.adm_pw = "admin" create_models(type="document") self.list_url = reverse('api_dispatch_list', kwargs={ 'api_name': 'favorites-api', 'resource_name': 'favorites' }) self.api_client = TestApiClient()
def setUp(self): super(FavoriteTest, self).setUp() self.adm_un = "admin" self.adm_pw = "admin" create_models(type="document") self.list_url = reverse( 'api_dispatch_list', kwargs={ 'api_name': 'favorites-api', 'resource_name': 'favorites'}) self.api_client = TestApiClient()
def test_create_models_triggers_actions(self): """ Test that layer creation triggers an action stream """ actions_list = get_actions_for_model('layer') initial_action_count = actions_list.count() # Create a test layer here create_models(type='layer', user=self.user) actions_list = get_actions_for_model('layer') final_action_count = actions_list.count() self.assertTrue(initial_action_count < final_action_count)
def setUp(self): try: # Ensure that gs_catalog.about() is falsy assert not gs_catalog.about() except AssertionError: # geoserver is running, skip the test self.skipTest('Geoserver should not be running for this test.') except socket_error as e: # gs_config.about() will throw a socket error if geoserver is not running (which is good in this case) print(e.__dict__) TopicCategory.objects.create(identifier='biota') TopicCategory.objects.create(identifier='location') TopicCategory.objects.create(identifier='elevation') create_models(type='layer')
def setUp(self): create_models(model_type='layer')
def setUp(self): create_models(type='map')