Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dece45f

Browse files
committed
Fix broken code
1 parent 45a1239 commit dece45f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55

66
from utilities.api_helpers.api import API
77

8+
api = API()
89
domain: str = "www.demoqa.com"
910
path: str = "/"
1011

1112

1213
@pytest.fixture(scope="session")
1314
def browser_context_args(browser_context_args: fixture) -> dict:
14-
response: Union[dict, str] = API.authenticate()
15+
response: Union[dict, str] = api.authenticate()
1516

1617
return {
1718
**browser_context_args,

utilities/api_helpers/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def authenticate() -> Union[dict, None]:
1818
tries: int = 10
1919

2020
while True:
21-
tries = -1
21+
tries -= 1
2222

2323
sleep(random())
2424
response: Response = requests.post(url=_url, data=_data)

0 commit comments

Comments
 (0)