KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am writing a unit test for Django views. class TestLog(unittest.TestCase): """Test for Contact""" def setUp(self): self.c = Client() try: self.bob = User.objects.create_user("mojo","b@example.com", "bmojo") except : print '' def test_get_emails(self): response = self.c.get('/text/') self.assertEqual(response.status_code, 200) def test_htmlemils(self): response = self.c.get('/emails/html/upload') self.assertEqual(response.status_code, 200) The c = Client() takes the 'http://testserver' as domain which i want to overwrite ,i want to add my real domain in that test client ,is their way to customize the test Client ?
Tags (comma-separated)
Save Edits
Cancel