from django.test import TestCase, Client from django.urls import reverse class LoggerTest(TestCase): def test_create_should_not_be_public(self): client = Client(HTTP_HOST="127.0.0.1:8001") response = client.post("/arduino/markers/create", {'abc': []}, content_type="application/json") self.assertEqual(response.status_code, 302) def test_censor_should_not_be_public(self): client = Client(HTTP_HOST="127.0.0.1:8001") response = client.get("/arduino/markers/censor") self.assertEqual(response.status_code, 302)