Skip to content

Commit

Permalink
ZO-141: Remove test for stopfile (belongs to a4875af)
Browse files Browse the repository at this point in the history
  • Loading branch information
wosc committed Jul 11, 2024
1 parent a4875af commit 09f2840
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions core/src/zeit/cms/browser/tests/test_healthcheck.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import os
import tempfile
import urllib.error

import zope.app.appsetup.product

import zeit.cms.testing


Expand All @@ -19,20 +13,3 @@ def test_should_normally_have_status_200(self):
b.open(self.check)
self.assertEqual('200 Ok', b.headers['status'])
self.assertEqual('OK', b.contents)

def test_should_fail_if_stopfile_exists(self):
handle, filename = tempfile.mkstemp()
os.close(handle)
os.unlink(filename)
config = zope.app.appsetup.product.getProductConfiguration('zeit.cms')
config['stopfile'] = filename

b = self.browser
with self.assertNothingRaised():
b.open(self.check)

open(filename, 'w').close()
with self.assertRaises(urllib.error.HTTPError) as info:
b.open(self.check)
self.assertEqual(500, info.exception.status)
self.assertEqual('fail: stopfile %s present' % filename)

0 comments on commit 09f2840

Please sign in to comment.