def test_it_works(self):
        r = self.post("/api/v1/checks/", {
            "api_key": "abc",
            "name": "Foo",
            "tags": "bar,baz",
            "timeout": 3600,
            "grace": 60
        })

        self.assertEqual(r.status_code, 201)
        self.assertTrue("ping_url" in r.json())

        self.assertEqual(Check.objects.count(), 1)
        check = Check.objects.get()
        self.assertEqual(check.name, "Foo")
        self.assertEqual(check.tags, "bar,baz")
        self.assertEqual(check.timeout.total_seconds(), 3600)
        self.assertEqual(check.grace.total_seconds(), 60)
dataset/ETHPy150Open healthchecks/healthchecks/hc/api/tests/test_create_check.py/CreateCheckTestCase.test_it_works/original