Beispiel #1
0
 def tearDown(self):
     User.drop_collection()
     Folder.drop_collection()
Beispiel #2
0
 def tearDown(self):
     Subscription.drop_collection()
     Feed.drop_collection()
     Read.drop_collection()
     Article.drop_collection()
     User.drop_collection()
Beispiel #3
0
 def tearDown(self):
     Article.drop_collection()
     User.drop_collection()
     Read.drop_collection()
     Feed.drop_collection()
Beispiel #4
0
from oneflow.base.tests import (connect_mongodb_testsuite, TEST_REDIS)

DjangoUser = get_user_model()
LOGGER     = logging.getLogger(__file__)

# Use the test database not to pollute the production/development one.
RedisStatsCounter.REDIS = TEST_REDIS

TEST_REDIS.flushdb()

connect_mongodb_testsuite()

# Empty the database before starting in case an old test failed to tearDown().
Article.drop_collection()
Read.drop_collection()
User.drop_collection()
Group.drop_collection()
Feed.drop_collection()
Tag.drop_collection()
Folder.drop_collection()
WebSite.drop_collection()
Author.drop_collection()


class ThrottleIntervalTest(TestCase):

    def test_lower_interval_with_etag_or_modified(self):

        t = Feed.throttle_fetch_interval

        some_news = 10
Beispiel #5
0
 def tearDown(self):
     User.drop_collection()
     Group.drop_collection()
Beispiel #6
0
 def tearDown(self):
     User.drop_collection()
     Folder.drop_collection()
Beispiel #7
0
 def tearDown(self):
     Article.drop_collection()
     User.drop_collection()
     Read.drop_collection()
     Feed.drop_collection()
Beispiel #8
0
 def tearDown(self):
     Subscription.drop_collection()
     Feed.drop_collection()
     Read.drop_collection()
     Article.drop_collection()
     User.drop_collection()
Beispiel #9
0
 def tearDown(self):
     User.drop_collection()
     Group.drop_collection()
Beispiel #10
0
from oneflow.base.tests import (connect_mongodb_testsuite, TEST_REDIS)

DjangoUser = get_user_model()
LOGGER = logging.getLogger(__file__)

# Use the test database not to pollute the production/development one.
RedisStatsCounter.REDIS = TEST_REDIS

TEST_REDIS.flushdb()

connect_mongodb_testsuite()

# Empty the database before starting in case an old test failed to tearDown().
Article.drop_collection()
Read.drop_collection()
User.drop_collection()
Group.drop_collection()
Feed.drop_collection()
Tag.drop_collection()
Folder.drop_collection()
WebSite.drop_collection()
Author.drop_collection()


class ThrottleIntervalTest(TestCase):
    def test_lower_interval_with_etag_or_modified(self):

        t = Feed.throttle_fetch_interval

        some_news = 10
        no_dupe = 0