diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_scripts/test_prequest.py | 7 | ||||
| -rw-r--r-- | tests/test_scripts/test_pserve.py | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_scripts/test_prequest.py b/tests/test_scripts/test_prequest.py index 2214f6350..97786ec83 100644 --- a/tests/test_scripts/test_prequest.py +++ b/tests/test_scripts/test_prequest.py @@ -234,10 +234,15 @@ class TestPRequestCommand(unittest.TestCase): self.assertEqual(self._out, [b'abc']) def test_command_method_configures_logging(self): - command = self._makeOne(['', 'development.ini', '/']) + command = self._makeOne(['', '--method=GET', 'development.ini', '/']) command.run() self.assertEqual(self.loader.calls[0]['op'], 'logging') + def test_command_script_name(self): + command = self._makeOne(['', '--method=GET', 'development.ini', '/'],) + command.run() + self.assertEqual(self.loader.calls[0]['defaults']['__script__'], 'prequest') + class Test_main(unittest.TestCase): def _callFUT(self, argv): diff --git a/tests/test_scripts/test_pserve.py b/tests/test_scripts/test_pserve.py index 5e5c28c7b..0b010692a 100644 --- a/tests/test_scripts/test_pserve.py +++ b/tests/test_scripts/test_pserve.py @@ -47,7 +47,7 @@ class TestPServeCommand(unittest.TestCase): self.loader.server = lambda x: x inst.run() - self.assertEqual(app.global_conf, {'a': '1', 'b': '2'}) + self.assertEqual(app.global_conf, {'a': '1', 'b': '2', '__script__': 'pserve'}) def test_original_ignore_files(self): msg = 'A change to "ignore_files" was detected' |
