Ejemplo n.º 1
0
    def setUp(self):

        setUpAccounts(self)
        setUpLocations(self)
        setUpResources(self)

        # reload these to avoid errors.
        self.resource6 = Resource.objects.get(id=self.resource6.id)
        self.resource7 = Resource.objects.get(id=self.resource7.id)

        self.curation1 = Curation(outcome='',
                                  tags=['#aliss-story'],
                                  note='This is my story, this is my song',
                                  owner=self.bob)
        self.curation1.item_metadata.update(author=self.bob)
        add_curation(self.resource6, self.curation1)

        self.curation2 = Curation(
            outcome='',
            tags=['#aliss-story'],
            note='Follow the hearts and, you can\'t go wrong',
            owner=self.bob)
        self.curation2.item_metadata.update(author=self.bob)
        add_curation(self.resource7, self.curation2)

        self.jorph.tags = ['#aliss-story']
        self.jorph.save()

        reindex_accounts(url=settings.TEST_SOLR_URL)
        reindex_resources(url=settings.TEST_SOLR_URL)

        from django.test.client import Client
        self.client = Client()
Ejemplo n.º 2
0
    def setUp(self):

        from analytics.models import AccountAnalytics, OverallAnalytics
        from accounts.models import Account

        from accounts.tests import setUpAccounts
        from locations.tests import setUpLocations
        from resources.tests import setUpResources
        from enginecab.views import reindex_resources

        setUpAccounts(self)
        setUpLocations(self)
        setUpResources(self)        
        reindex_resources(url=settings.TEST_SOLR_URL)

        self.account = Account.objects[2]

        self.account_analytics = AccountAnalytics(self.account, redis_db=settings.TEST_REDIS_ANALYTICS_DATABASE)
        self.overall_analytics = OverallAnalytics(redis_db=settings.TEST_REDIS_ANALYTICS_DATABASE)
        self.redis = self.account_analytics.conn
        self.redis.flushdb()

        from django.test.client import Client

        self.client = Client()
Ejemplo n.º 3
0
    def setUp(self):

        from analytics.models import AccountAnalytics, OverallAnalytics
        from accounts.models import Account

        from accounts.tests import setUpAccounts
        from locations.tests import setUpLocations
        from resources.tests import setUpResources
        from enginecab.views import reindex_resources

        setUpAccounts(self)
        setUpLocations(self)
        setUpResources(self)
        reindex_resources(url=settings.TEST_SOLR_URL)

        self.account = Account.objects[2]

        self.account_analytics = AccountAnalytics(
            self.account, redis_db=settings.TEST_REDIS_ANALYTICS_DATABASE)
        self.overall_analytics = OverallAnalytics(
            redis_db=settings.TEST_REDIS_ANALYTICS_DATABASE)
        self.redis = self.account_analytics.conn
        self.redis.flushdb()

        from django.test.client import Client

        self.client = Client()
Ejemplo n.º 4
0
    def setUp(self):

        setUpAccounts(self)
        setUpLocations(self)
        setUpResources(self)

        # reload these to avoid errors.
        self.resource6 = Resource.objects.get(id=self.resource6.id)
        self.resource7 = Resource.objects.get(id=self.resource7.id)

        self.curation1 = Curation(
            outcome='',
            tags=['#aliss-story'],
            note='This is my story, this is my song',
            owner=self.bob)
        self.curation1.item_metadata.update(author=self.bob)
        add_curation(self.resource6, self.curation1)

        self.curation2 = Curation(
            outcome='',
            tags=['#aliss-story'],
            note='Follow the hearts and, you can\'t go wrong',
            owner=self.bob)
        self.curation2.item_metadata.update(author=self.bob)
        add_curation(self.resource7, self.curation2)

        self.jorph.tags = ['#aliss-story']
        self.jorph.save()

        reindex_accounts(url=settings.TEST_SOLR_URL)
        reindex_resources(url=settings.TEST_SOLR_URL)

        from django.test.client import Client
        self.client = Client()
Ejemplo n.º 5
0
 def setUp(self):
     from accounts.tests import setUpAccounts
     from locations.tests import setUpLocations
     from resources.tests import setUpResources
     setUpAccounts(self)
     setUpLocations(self)
     setUpResources(self)
Ejemplo n.º 6
0
    def setUp(self):
        from accounts.tests import setUpAccounts
        from locations.tests import setUpLocations
        from resources.tests import setUpResources
        setUpAccounts(self)
        setUpLocations(self)
        setUpResources(self)

        from django.test.client import Client

        self.client = Client()
Ejemplo n.º 7
0
    def setUp(self):
        from accounts.tests import setUpAccounts
        from locations.tests import setUpLocations
        from resources.tests import setUpResources
        setUpAccounts(self)
        setUpLocations(self)
        setUpResources(self)

        from django.test.client import Client

        self.client = Client()