summaryrefslogtreecommitdiff
path: root/tests/test_scripts/test_prequest.py
diff options
context:
space:
mode:
authoradroullier <arndt@nive.co>2023-10-19 17:40:31 +0200
committeradroullier <arndt@nive.co>2023-10-24 13:24:24 +0200
commitcbdc4b9ad9bdb20a4e0ad17f9d5af26147b771f9 (patch)
tree3f51eae7af402c8ae4a5b7b229ad8f2919954b9f /tests/test_scripts/test_prequest.py
parent3739a7790ba92c34098df3d804f27a1d8429f9fe (diff)
downloadpyramid-cbdc4b9ad9bdb20a4e0ad17f9d5af26147b771f9.tar.gz
pyramid-cbdc4b9ad9bdb20a4e0ad17f9d5af26147b771f9.tar.bz2
pyramid-cbdc4b9ad9bdb20a4e0ad17f9d5af26147b771f9.zip
Adding script name to 'global_config' during application setup as '__script__'
Diffstat (limited to 'tests/test_scripts/test_prequest.py')
-rw-r--r--tests/test_scripts/test_prequest.py7
1 files changed, 6 insertions, 1 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):