def test_delete(self): response = self.client.delete( reverse("config-detail", args=[self.string_config_key]) ) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) self.assertTrue(config.exists(self.string_config_key))
def test_config_exists(self): self.assertTrue(config.exists('string_var')) self.assertFalse(config.exists('unknown_config_var'))
def test_create(self): response = self.client.post( reverse("config-list"), {"key": "test_key_fj3f2oqsjcqpsjclqwoO"} ) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) self.assertFalse(config.exists("test_key_fj3f2oqsjcqpsjclqwoO"))