示例#1
0
    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)
            pass

        TopicCategory.objects.create(identifier='biota')
        TopicCategory.objects.create(identifier='location')
        TopicCategory.objects.create(identifier='elevation')

        create_models(type='layer')
示例#2
0
    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)
            pass

        TopicCategory.objects.create(identifier='biota')
        TopicCategory.objects.create(identifier='location')
        TopicCategory.objects.create(identifier='elevation')

        create_models(type='layer')
示例#3
0
    def setUp(self):

        try:
            # Ensure Geoserver is running.
            assert gs_catalog.about()
        except socket_error as e:
            self.skipTest('Geoserver must be running for this test.')

        self.username, self.password = self.create_user('admin', 'admin', is_superuser=True)
        self.non_admin, self.non_admin_password = self.create_user('non_admin', 'non_admin', is_superuser=True)
        self.layer_name = 'testz'
        self.workspace ='geonode'
        self.postgis = db.connections['datastore']
        self.datastore = self.create_datastore(self.postgis, gs_catalog)

        cursor = self.postgis.cursor()
        cursor.execute("drop domain if exists bigdate cascade;")
        cursor.execute("create domain bigdate as bigint;")
示例#4
0
    def setUp(self):

        try:
            # Ensure Geoserver is running.
            assert gs_catalog.about()
        except socket_error as e:
            self.skipTest('Geoserver must be running for this test.')

        self.username, self.password = self.create_user('admin',
                                                        'admin',
                                                        is_superuser=True)
        self.non_admin, self.non_admin_password = self.create_user(
            'non_admin', 'non_admin', is_superuser=True)
        self.layer_name = 'testz'
        self.workspace = 'geonode'
        self.postgis = db.connections['datastore']
        self.datastore = self.create_datastore(self.postgis, gs_catalog)

        cursor = self.postgis.cursor()
        cursor.execute("drop domain if exists bigdate cascade;")
        cursor.execute("create domain bigdate as bigint;")