12345678910111213141516171819202122 |
- from django.test import TestCase, Client
- class StammbaumTest(TestCase):
- def test_view_should_not_be_public(self):
- client = Client(HTTP_HOST="127.0.0.1:8001")
- response = client.get("/stammbaum/")
- self.assertEqual(response.status_code, 403)
-
- def test_preview_should_not_be_public(self):
- client = Client(HTTP_HOST="127.0.0.1:8001")
- response = client.get("/stammbaum/person/1/thumb")
- self.assertEqual(response.status_code, 301)
- def test_image_should_not_be_public(self):
- client = Client(HTTP_HOST="127.0.0.1:8001")
- response = client.get("/stammbaum/person/1/image")
- self.assertEqual(response.status_code, 301)
- def test_upload_should_not_be_public(self):
- client = Client(HTTP_HOST="127.0.0.1:8001")
- response = client.post("/stammbaum/person/1/upload")
- self.assertEqual(response.status_code, 301)
|