def test_provenance_revision_add(provenance, swh_storage_with_objects, archive_pg): """Test the ProvenanceDB.revision_add() method""" for revision in TEST_OBJECTS["revision"]: entry = RevisionEntry( archive_pg, id=revision.id, date=ts2dt(revision.date), root=revision.directory, parents=revision.parents, ) revision_add(provenance, archive_pg, entry) # there should be only one 'location' for the empty path provenance.cursor.execute("SELECT count(*) FROM location WHERE path=''") > assert provenance.cursor.fetchone()[0] == 1 E assert 0 == 1 swh/provenance/tests/test_provenance_db.py:58: AssertionError