Skip to content

Commit

Permalink
Add test to ensure the date is properly formatted
Browse files Browse the repository at this point in the history
The format of the date is stricted than what is permitted by ISO 8601,
so add a test with a basic pattern to make sure formatting is not broken
again in the future.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
  • Loading branch information
smortex authored and carmenbianca committed Apr 8, 2024
1 parent 188d3a1 commit b855853
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@


import os
import re
import sys
from importlib import import_module
from textwrap import dedent
Expand Down Expand Up @@ -451,7 +452,11 @@ def test_bill_of_materials(fake_repository, multiprocessing):
project = Project.from_directory(fake_repository)
report = ProjectReport.generate(project, multiprocessing=multiprocessing)
# TODO: Actually do something
report.bill_of_materials()
bom = report.bill_of_materials()
created_re = re.compile(
r"^Created: \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$", re.MULTILINE
)
assert created_re.search(bom) is not None


# REUSE-IgnoreEnd

0 comments on commit b855853

Please sign in to comment.