Skip to content

Commit d6caf55

Browse files
tidy unit tests
1 parent ab5935f commit d6caf55

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

tests_utils/test_axe.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from pathlib import Path
44
from utils.axe import Axe
55

6+
67
pytestmark = [pytest.mark.utils]
78

89
AXE_REPORTS_DIR = Path(__file__).parent.parent / "axe-reports"

tests_utils/test_date_time_utils.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
import utils.date_time_utils
33

44

5+
pytestmark = [pytest.mark.utils]
6+
57
def test_current_datetime():
68
dtu = utils.date_time_utils.DateTimeUtils()
79
current_date = datetime.now()
8-
current_date1 = current_date.strftime("%d/%m/%Y %H:%M")
9-
current_date2 = current_date.strftime("%Y-%m-%d %H:%M")
10-
current_date3 = current_date.strftime("%d %B %Y %H:%M")
1110
assert dtu.current_datetime() == current_date.strftime("%d/%m/%Y %H:%M")
1211
assert dtu.current_datetime("%Y-%m-%d %H:%M") == current_date.strftime("%Y-%m-%d %H:%M")
1312
assert dtu.current_datetime("%d %B %Y %H:%M") == current_date.strftime("%d %B %Y %H:%M")
@@ -16,9 +15,6 @@ def test_current_datetime():
1615
def test_format_date():
1716
dtu = utils.date_time_utils.DateTimeUtils()
1817
date = datetime(2022, 12, 31)
19-
formatted_date1 = dtu.format_date(date, "%d/%m/%Y")
20-
formatted_date2 = dtu.format_date(date, "%Y/%m/%d")
21-
formatted_date3 = dtu.format_date(date, "%d %B %Y")
2218
assert dtu.format_date(date, "%d/%m/%Y") == "31/12/2022"
2319
assert dtu.format_date(date, "%Y/%m/%d") == "2022/12/31"
2420
assert dtu.format_date(date, "%d %B %Y") == "31 December 2022"

0 commit comments

Comments
 (0)