Added tests for RequestSite.__init__() and __str__().
This commit is contained in:
parent
2015f5f134
commit
129f4900be
|
@ -214,6 +214,13 @@ class RequestSiteTests(SimpleTestCase):
|
|||
request.META = {'HTTP_HOST': 'example.com'}
|
||||
self.site = RequestSite(request)
|
||||
|
||||
def test_init_attributes(self):
|
||||
self.assertEqual(self.site.domain, 'example.com')
|
||||
self.assertEqual(self.site.name, 'example.com')
|
||||
|
||||
def test_str(self):
|
||||
self.assertEqual(str(self.site), 'example.com')
|
||||
|
||||
def test_save(self):
|
||||
msg = 'RequestSite cannot be saved.'
|
||||
with self.assertRaisesMessage(NotImplementedError, msg):
|
||||
|
|
Loading…
Reference in New Issue