def tearDown(self): self.client.logout() Subscription.drop_collection() Read.drop_collection() Folder.drop_collection() Preferences.drop_collection() User.drop_collection()
def tearDown(self): User.drop_collection() self.client.logout()
#from unittest import skip 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() Feed.drop_collection() Tag.drop_collection() WebSite.drop_collection() Author.drop_collection() @override_settings(STATICFILES_STORAGE= 'pipeline.storage.NonPackagingPipelineStorage', CELERY_EAGER_PROPAGATES_EXCEPTIONS=True, CELERY_ALWAYS_EAGER=True, BROKER_BACKEND='memory',) class HomeAndPreferencesViewTest(TestCase): def setUp(self): self.client = Client()