diff options
| author | Michael Merickel <michael@merickel.org> | 2024-01-27 18:23:23 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-27 18:23:23 -0700 |
| commit | 55f9eb0bb0b72fe60ecde7529edbc27aceade187 (patch) | |
| tree | 1e34614ff9be1c59ad6a2ebb1f4e8bc2a17c6c1d /tests/test_scripts/test_prequest.py | |
| parent | 19ae96b97ea055c2e36c8fb86819c426b37ab6af (diff) | |
| parent | fd42b0c8d08f69f88e3728b1c1ff3f50071f4b30 (diff) | |
| download | pyramid-55f9eb0bb0b72fe60ecde7529edbc27aceade187.tar.gz pyramid-55f9eb0bb0b72fe60ecde7529edbc27aceade187.tar.bz2 pyramid-55f9eb0bb0b72fe60ecde7529edbc27aceade187.zip | |
Merge pull request #3735 from adroullier/script_info
Adding script name to 'global_config' during application setup
Diffstat (limited to 'tests/test_scripts/test_prequest.py')
| -rw-r--r-- | tests/test_scripts/test_prequest.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_scripts/test_prequest.py b/tests/test_scripts/test_prequest.py index 2214f6350..4ff6cb34c 100644 --- a/tests/test_scripts/test_prequest.py +++ b/tests/test_scripts/test_prequest.py @@ -234,10 +234,17 @@ 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): |
