Skip to content

Commit 533c31c

Browse files
committed
Merge branch '383-status-should-be-uses-last-request-even-if-a-response-is-provided'
2 parents ff2d0a2 + bd42530 commit 533c31c

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

.github/workflows/pythonapp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ ubuntu-latest, macos-latest, windows-latest ]
14-
python-version: [ 2.7, 3.7, 3.8, 3.x ]
14+
python-version: [ 3.7, 3.8, 3.x ]
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Set up Python

atests/issues/334.robot

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*** Settings ***
2+
Library RequestsLibrary
3+
Resource ../res_setup.robot
4+
5+
Suite Setup Setup Flask Http Server
6+
Suite Teardown Teardown Flask Http Server And Sessions
7+
8+
*** Test Cases ***
9+
10+
Test evaluated response is always the one passed
11+
${response_error}= GET On Session ${GLOBAL_SESSION} url=/status/404 expected_status=any
12+
${response_ok}= GET On Session ${GLOBAL_SESSION} url=/status/200 expected_status=any
13+
Status Should Be 404 ${response_error}

src/RequestsLibrary/RequestsKeywords.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def status_should_be(self, expected_status, response=None, msg=None):
116116
| ELSE
117117
| [...]
118118
"""
119-
if not response:
119+
if response is None:
120120
response = self.last_response
121121
self._check_status(expected_status, response, msg)
122122

src/RequestsLibrary/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '1.0a7'
1+
VERSION = '1.0a8'

0 commit comments

Comments
 (0)