def setUp(self): super(SearchApiTests, self).setUp() self.list_url = reverse( 'api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'layers'}) all_public() self.norman = get_user_model().objects.get(username="******") self.norman.groups.add(Group.objects.get(name='anonymous')) self.test_user = get_user_model().objects.get(username='******') self.test_user.groups.add(Group.objects.get(name='anonymous')) self.bar = GroupProfile.objects.get(slug='bar') self.anonymous_user = get_anonymous_user() self.profiles_list_url = reverse( 'api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'profiles'}) self.groups_list_url = reverse( 'api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'groups'})
def setUpClass(cls): super().setUpClass() create_models(type=cls.get_type, integration=cls.get_integration) all_public() cls.user_admin = get_user_model().objects.get(username="******") if check_ogc_backend(geoserver.BACKEND_PACKAGE): cls.dataset_coast_line = create_single_dataset('san_andres_y_providencia_coastline')
def setUp(self): super(ThesaurusKeywordResourceTests, self).setUp() all_public() self.list_url = reverse("api_dispatch_list", kwargs={ "api_name": "api", "resource_name": "thesaurus/keywords" })
def setUp(self): super(MapResourceTests, self).setUp() all_public() self.user = get_user_model().objects.get(username="******") self.list_url = reverse('api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'maps' })
def setUp(self): super(UnpublishedObjectTests, self).setUp() self.list_url = reverse('api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'layers' }) all_public()
def setUp(self): super(PermissionsApiTests, self).setUp() self.user = '******' self.passwd = 'admin' self.list_url = reverse('api_dispatch_list', kwargs={'api_name':'api', 'resource_name':'layers'}) create_models(type='layer') all_public() self.perm_spec = {"users": {}, "groups": {}}
def setUp(self): super(UnpublishedObjectTests, self).setUp() self.list_url = reverse( 'api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'layers'}) all_public()
def setUp(self): super(PermissionsApiTests, self).setUp() self.user = '******' self.passwd = 'admin' self.list_url = reverse('api_dispatch_list', kwargs={'api_name':'api', 'resource_name':'layers'}) create_models(type='layer') all_public() self.perm_spec = {"anonymous":"_none","authenticated":"layer_readwrite","users":[]}
def setUp(self): super(SearchApiTests, self).setUp() self.list_url = reverse( 'api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'layers'}) create_models(type='layer') all_public()
def setUp(self): super(PermissionsApiTests, self).setUp() self.user = '******' self.passwd = 'admin' self.list_url = reverse('api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'layers' }) all_public() self.perm_spec = {"users": {}, "groups": {}}
def setUp(self): super(LayerResourceTests, self).setUp() self.user = get_user_model().objects.get(username="******") self.list_url = reverse('api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'layers' }) all_public() self.token = get_or_create_token(self.user) self.auth_header = 'Bearer {}'.format(self.token)
def setUp(self): super(DataTypeResourceTests, self).setUp() self.user = get_user_model().objects.get(username="******") self.list_url = reverse('api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'datatype' }) all_public() self.token = get_or_create_token(self.user) self.auth_header = f'Bearer {self.token}'
def setUp(self): super(BulkPermissionsTests, self).setUp() self.user = '******' self.passwd = 'admin' self.list_url = reverse( 'api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'layers'}) self.bulk_perms_url = reverse('bulk_permissions') all_public() self.perm_spec = { "users": {"admin": ["view_resourcebase"]}, "groups": {}}
def setUp(self): self.user = '******' self.passwd = 'admin' create_models(type='layer') create_layer_data() create_notifications() self.anonymous_user = get_anonymous_user() self.list_url = reverse('api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'layers' }) all_public()
def setUp(self): self.user = '******' self.passwd = 'admin' create_models(type='layer') create_layer_data() create_notifications() self.anonymous_user = get_anonymous_user() self.list_url = reverse( 'api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'layers'}) all_public()
def setUp(self): super(OAuthApiTests, self).setUp() self.user = '******' self.passwd = 'admin' self._user = get_user_model().objects.get(username=self.user) self.token = get_or_create_token(self._user) self.auth_header = 'Bearer {}'.format(self.token) self.list_url = reverse( 'api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'layers'}) all_public() self.perm_spec = {"users": {}, "groups": {}}
def setUp(self): super(BulkPermissionsTests, self).setUp() self.user = '******' self.passwd = 'admin' self.list_url = reverse( 'api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'layers'}) self.bulk_perms_url = reverse('bulk_permissions') create_models(type='layer') all_public() self.perm_spec = { "users": {"admin": ["view_resourcebase"]}, "groups": {}}
def setUp(self): super(OAuthApiTests, self).setUp() self.user = '******' self.passwd = 'admin' self._user = get_user_model().objects.get(username=self.user) self.token = get_or_create_token(self._user) self.auth_header = f'Bearer {self.token}' self.list_url = reverse('api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'layers' }) all_public() self.perm_spec = {"users": {}, "groups": {}}
def setUp(self): super(BulkPermissionsTests, self).setUp() if check_ogc_backend(geoserver.BACKEND_PACKAGE): settings.OGC_SERVER['default']['GEOFENCE_SECURITY_ENABLED'] = True self.user = '******' self.passwd = 'admin' self.list_url = reverse( 'api_dispatch_list', kwargs={ 'api_name': 'api', 'resource_name': 'layers'}) self.bulk_perms_url = reverse('bulk_permissions') all_public() self.perm_spec = { "users": {"admin": ["view_resourcebase"]}, "groups": {}}
def setUp(self): super(UnpublishedObjectTests, self).setUp() self.list_url = reverse("api_dispatch_list", kwargs={"api_name": "api", "resource_name": "layers"}) create_models(type="layer") all_public()
def setUpClass(cls): super().setUpClass() create_models(type=cls.get_type, integration=cls.get_integration) all_public()