From 8aa179fb3763bd15a3d33bdb6d6ad4cd7d30ac69 Mon Sep 17 00:00:00 2001 From: Yanoom Date: Thu, 4 Jun 2020 23:10:08 +0300 Subject: [PATCH] Fix false positive in e2e logfile endpoint test Wrong usage of text.find method --- tests/test_pyctuator_e2e.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_pyctuator_e2e.py b/tests/test_pyctuator_e2e.py index 56b5922..edb9c92 100644 --- a/tests/test_pyctuator_e2e.py +++ b/tests/test_pyctuator_e2e.py @@ -215,13 +215,13 @@ def test_logfile_endpoint(endpoints: Endpoints) -> None: thirsty_str = "These pretzels are making me thirsty" response: Response = requests.get( endpoints.root + "logfile_test_repeater", - params={"repeated_string": "thirsty_str"} + params={"repeated_string": thirsty_str} ) assert response.status_code == HTTPStatus.OK.value response = requests.get(endpoints.logfile) assert response.status_code == HTTPStatus.OK.value - assert response.text.find(thirsty_str) + assert response.text.find(thirsty_str) >= 0 response = requests.get(endpoints.logfile, headers={"Range": "bytes=-307200"}) # Immitate SBA's 1st request assert response.status_code == HTTPStatus.PARTIAL_CONTENT.value