|     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

Verified Commit 07e98927 authored by Emi Simpson's avatar Emi Simpson
Browse files

Support new flagging feature in tests

parent f12aee5b
Pipeline #237 passed with stages
in 1 minute and 51 seconds
......@@ -177,14 +177,14 @@ class TestProject:
src_url = ""
src_id = project.add_data_source(database, src_type, src_url).origin_id
assert project.get_data_sources(database) == [Source(src_id, project, src_type, src_url)]
assert project.get_data_sources(database) == [Source(src_id, project, src_type, src_url, False)]
SELECT * FROM data_sources;
records = database.fetchall()
assert len(records) == 1
assert records[0] == (src_id, project.project_id, src_type, src_url)
assert records[0] == (src_id, project.project_id, src_type, src_url, False)
def test_add_datasource_validates_project(self, database: Cursor, missing_project: Project) -> None:
with raises(NonexistantId):
......@@ -243,13 +243,13 @@ class TestProject:
generate_source(project2, ('github', 'weblink3'))
assert project1.get_data_sources(database) == [
Git (sources[0], project1, 'git', 'gitlink1'),
Git (sources[1], project1, 'git', 'gitlink2'),
GitHub(sources[2], project1, 'github', 'weblink1'),
Git (sources[0], project1, 'git', 'gitlink1', False),
Git (sources[1], project1, 'git', 'gitlink2', False),
GitHub(sources[2], project1, 'github', 'weblink1', False),
assert project2.get_data_sources(database) == [
GitHub(sources[3], project2, 'github', 'weblink2'),
GitHub(sources[4], project2, 'github', 'weblink3'),
GitHub(sources[3], project2, 'github', 'weblink2', False),
GitHub(sources[4], project2, 'github', 'weblink3', False),
assert project3.get_data_sources(database) == list()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment