Esempio n. 1
0
    def setup_class(cls):
        SpatialTestBase.setup_class()

        # Start simple HTTP server that serves XML test files
        if not cls.serving:
            serve()
            cls.serving = True
Esempio n. 2
0
    def setup_class(cls):
        SpatialTestBase.setup_class()

        # Start simple HTTP server that serves XML test files
        if not cls.serving:
            serve()
            cls.serving = True
Esempio n. 3
0
    from ckan.new_tests.helpers import call_action
except ImportError:
    from ckan.tests.helpers import call_action

from ckanext.harvest.model import (HarvestSource, HarvestJob, HarvestObject)
from ckanext.spatial.validation import Validators
from ckanext.spatial.harvesters.gemini import (GeminiDocHarvester,
                                               GeminiWafHarvester,
                                               GeminiHarvester)
from ckanext.spatial.harvesters.base import SpatialHarvester
from ckanext.spatial.tests.base import SpatialTestBase

from xml_file_server import serve

# Start simple HTTP server that serves XML test files
serve()


class HarvestFixtureBase(SpatialTestBase):

    def setup(self):
        # Add sysadmin user
        harvest_user = model.User(name=u'harvest', password=u'test', sysadmin=True)
        Session.add(harvest_user)
        Session.commit()

        package_schema = default_update_package_schema()
        self.context ={'model':model,
                       'session':Session,
                       'user':u'harvest',
                       'schema':package_schema,
Esempio n. 4
0
from ckan.logic import get_action
from ckanext.harvest.model import (setup as harvest_model_setup,
                                   HarvestSource, HarvestJob, HarvestObject,
                                   HarvestCoupledResource)
from ckanext.spatial.validation import Validators, SchematronValidator
from ckanext.spatial.harvesters.gemini import (GeminiDocHarvester,
                                        GeminiWafHarvester,
                                        GeminiHarvester)
from ckanext.spatial.harvesters.base import SpatialHarvester
from ckanext.spatial.model.package_extent import setup as spatial_db_setup
from ckanext.spatial.tests.base import SpatialTestBase

from xml_file_server import serve

# Start simple HTTP server that serves XML test files
serve()

class HarvestFixtureBase(SpatialTestBase):

    @classmethod
    def setup_class(cls):
        SpatialTestBase.setup_class()

    def setup(self):
        # Add sysadmin user
        harvest_user = model.User(name=u'harvest', password=u'test', sysadmin=True)
        Session.add(harvest_user)
        Session.commit()

        package_schema = default_update_package_schema()
        self.context ={'model':model,