diff options
| author | ordinary-jamie <jamie@ordinarylab.dev> | 2023-03-09 13:07:58 +1100 |
|---|---|---|
| committer | ordinary-jamie <jamie@ordinarylab.dev> | 2023-03-09 13:21:28 +1100 |
| commit | b5c16e70e14efc867c089704c3f73fd4cc8eb9d6 (patch) | |
| tree | 0da53aa53e31db88f629e1623e4bdb1681ada5a7 /tests | |
| parent | 8ef619fff5127af55b66c1e6c4f8568f3a29acf4 (diff) | |
| download | webtest-b5c16e70e14efc867c089704c3f73fd4cc8eb9d6.tar.gz | |
Add TestResponse.clickbutton onclick kwarg
This change allows the TestResponse to follow customised onclick buttons
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_response.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_response.py b/tests/test_response.py index f2799bb..aa1cb1d 100644 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -250,6 +250,10 @@ class TestResponse(unittest.TestCase): 'This is foo.', app.get('/').clickbutton(buttonid='button1', verbose=True) ) + self.assertIn( + 'This is foo.', + app.get('/').clickbutton(buttonid='button3', onclick=r".*href='(.*?)'", verbose=True) + ) self.assertRaises( IndexError, app.get('/').clickbutton, buttonid='button2' |
