MCPcopy
hub / github.com/django/django / test_site_manager

Method test_site_manager

tests/sites_tests/tests.py:32–38  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 self.addCleanup(Site.objects.clear_cache)
31
32 def test_site_manager(self):
33 # Make sure that get_current() does not return a deleted Site object.
34 s = Site.objects.get_current()
35 self.assertIsInstance(s, Site)
36 s.delete()
37 with self.assertRaises(ObjectDoesNotExist):
38 Site.objects.get_current()
39
40 def test_site_cache(self):
41 # After updating a Site object (e.g. via the admin), we shouldn't

Callers

nothing calls this directly

Calls 2

get_currentMethod · 0.80
deleteMethod · 0.45

Tested by

no test coverage detected