예제 #1
0
 def test_add_staging_providers(self):
     populate_main('stage')
     providers = PreprintProvider.objects.all()
     assert_equal(PreprintProvider.objects.all().count(), len(STAGING_PREPRINT_PROVIDERS))
     ids = [provider._id for provider in providers]
     for id in STAGING_PREPRINT_PROVIDERS:
         assert_in(id, ids)
 def test_add_staging_providers(self):
     populate_main('stage')
     providers = PreprintProvider.objects.all()
     assert_equal(PreprintProvider.objects.all().count(), len(STAGING_PREPRINT_PROVIDERS))
     ids = [provider._id for provider in providers]
     for id in STAGING_PREPRINT_PROVIDERS:
         assert_in(id, ids)
예제 #3
0
 def test_add_default_providers(self):
     populate_main(None)
     providers = PreprintProvider.objects.all()
     assert_equal(providers.count(), len(PROD_PREPRINT_PROVIDERS))
     ids = [provider._id for provider in providers]
     for id in PROD_PREPRINT_PROVIDERS:
         assert_in(id, ids)
     for id in set(STAGING_PREPRINT_PROVIDERS) - set(PROD_PREPRINT_PROVIDERS):
         assert_not_in(id, ids)
 def test_add_default_providers(self):
     populate_main(None)
     providers = PreprintProvider.objects.all()
     assert_equal(providers.count(), len(PROD_PREPRINT_PROVIDERS))
     ids = [provider._id for provider in providers]
     for id in PROD_PREPRINT_PROVIDERS:
         assert_in(id, ids)
     for id in set(STAGING_PREPRINT_PROVIDERS) - set(PROD_PREPRINT_PROVIDERS):
         assert_not_in(id, ids)
예제 #5
0
 def test_add_prod_providers(self):
     populate_main('prod')
     providers = PreprintProvider.find()
     assert_equal(providers.count(), len(PROD_PREPRINT_PROVIDERS))
     ids = [provider._id for provider in providers]
     for id in PROD_PREPRINT_PROVIDERS:
         assert_in(id, ids)
     for id in set(STAGING_PREPRINT_PROVIDERS) - set(
             PROD_PREPRINT_PROVIDERS):
         assert_not_in(id, ids)