示例#1
0
 def test_has_none_in_context_if_file_doesnt_exist(self):
     response = robots_txt(self.get_request(self.site2))
     self.assertIsNone(response.context_data['object'])
示例#2
0
 def test_has_file_object_in_context_if_exists(self):
     response = robots_txt(self.get_request(self.site1))
     self.assertEqual(response.context_data['object'], self.file)