Skip to content
Snippets Groups Projects
Commit 8bd8292f authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

TST: added a test for display of the license check warning

parent 42079d5c
No related branches found
No related tags found
1 merge request!7FAIRness check
Pipeline #58835 passed
...@@ -26,13 +26,19 @@ from ruqad.crawler import trigger_crawler ...@@ -26,13 +26,19 @@ from ruqad.crawler import trigger_crawler
DATADIR = Path(__file__).parent / "data" / "crawler_data" DATADIR = Path(__file__).parent / "data" / "crawler_data"
def test_crawl(): def test_crawl(capsys):
""" """
crawl a directory as it would be created by export from kadi and running a data quality check crawl a directory as it would be created by export from kadi and running a data quality check
""" """
print(os.listdir(DATADIR)) print(os.listdir(DATADIR))
retval, ent_qc = trigger_crawler(os.fspath(DATADIR)) retval, ent_qc = trigger_crawler(os.fspath(DATADIR))
stdout, stderr = capsys.readouterr()
# Check whether the warning is displayed for the license check:
assert "/1222/export.eln does not contain a license." in stdout
assert "/1223/export.eln does not contain a license." not in stdout
# Check that validation of metadata was successful: # Check that validation of metadata was successful:
assert retval assert retval
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment