示例#1
0
 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))
示例#2
0
 def test_config_exists(self):
     self.assertTrue(config.exists('string_var'))
     self.assertFalse(config.exists('unknown_config_var'))
示例#3
0
 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"))
示例#4
0
 def test_config_exists(self):
     self.assertTrue(config.exists('string_var'))
     self.assertFalse(config.exists('unknown_config_var'))