def test_enabled_filter(self):
     "Return only providers with key/secret pairs."
     request = self.factory.get("/")
     context = available_providers(request)
     self.assertTrue('allaccess_providers' in context)
     providers = context['allaccess_providers']
     self.assertTrue(self.enabled_provider in providers)
     self.assertFalse(self.disabled_provider in providers)
Example #2
0
 def test_enabled_filter(self):
     "Return only providers with key/secret pairs."
     request = self.factory.get("/")
     context = available_providers(request)
     self.assertTrue('allaccess_providers' in context)
     providers = context['allaccess_providers']
     self.assertTrue(self.enabled_provider in providers)
     self.assertFalse(self.disabled_provider in providers)
 def test_no_queries(self):
     "Context processor should not execute any queries (only lazy queryset)."
     request = self.factory.get("/")
     with self.assertNumQueries(0):
         context = available_providers(request)
Example #4
0
 def test_no_queries(self):
     "Context processor should not execute any queries (only lazy queryset)."
     request = self.factory.get("/")
     with self.assertNumQueries(0):
         context = available_providers(request)