Skip to content

Commit cece950

Browse files
quality fixes
1 parent 701a845 commit cece950

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

tests_utils/resources/test_users.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"Test User": {
33
"username": "TEST_USER1",
44
"test_key": "TEST A"

tests_utils/test_nhs_number_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def test_nhs_number_checks() -> None:
99

1010
with pytest.raises(Exception, match=r'The NHS number provided \(A234567890\) is not numeric.'):
1111
NHSNumberTools._nhs_number_checks("A234567890")
12-
12+
1313
with pytest.raises(NHSNumberToolsException, match=r'The NHS number provided \(123\) is not 10 digits'):
1414
NHSNumberTools._nhs_number_checks("123")
1515

users.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"_comment": "This file can be used to store data on users for your application, and then pulled through using the utils.user_tools UserTools utility. The documentation for this utility explains how this file is read.",
33
"Example User 1": {
44
"username": "EXAMPLE_USER1",

utils/axe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def run(page: Page,
3737
strict_mode (bool): [Optional] If true, raise an exception if a violation is detected. If false (default), proceed with test execution.
3838
html_report_generated (bool): [Optional] If true (default), generates a html report for the page scanned. If false, no html report is generated.
3939
json_report_generated (bool): [Optional] If true (default), generates a json report for the page scanned. If false, no json report is generated.
40-
40+
4141
Returns:
4242
dict: A Python dictionary with the axe-core output of the page scanned.
4343
"""
@@ -85,7 +85,7 @@ def run_list(page: Page,
8585
strict_mode (bool): [Optional] If true, raise an exception if a violation is detected. If false (default), proceed with test execution.
8686
html_report_generated (bool): [Optional] If true (default), generates a html report for the page scanned. If false, no html report is generated.
8787
json_report_generated (bool): [Optional] If true (default), generates a json report for the page scanned. If false, no json report is generated.
88-
88+
8989
Returns:
9090
dict: A Python dictionary with the axe-core output of all the pages scanned, with the page list used as the key for each report.
9191
"""

utils/user_tools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ def retrieve_user(user: str) -> dict:
1919
2020
Args:
2121
user (str): The user details required, using the record key from users.json.
22-
22+
2323
Returns:
2424
dict: A Python dictionary with the details of the user requested, if present.
2525
"""
2626
with open(USERS_FILE, 'r') as file:
2727
user_data = json.loads(file.read())
28-
28+
2929
if not user in user_data:
3030
raise UserToolsException(f"User [{user}] is not present in users.json")
31-
31+
3232
logger.debug(f"Returning user: {user_data[user]}")
3333
return user_data[user]
3434

0 commit comments

Comments
 (0)