Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9341326
test_conftest.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
test_conftest.py
View Options
# Copyright (C) 2021-2022 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from
swh.provenance.interface
import
ProvenanceInterface
from
swh.provenance.tests.conftest
import
fill_storage
,
load_repo_data
from
swh.storage.interface
import
StorageInterface
def
test_provenance_fixture
(
provenance
:
ProvenanceInterface
)
->
None
:
"""Check the 'provenance' fixture produce a working
ProvenanceStoragePostgreSql object"""
assert
provenance
provenance
.
flush
()
# should be a noop
def
test_fill_storage
(
swh_storage
:
StorageInterface
)
->
None
:
"""Check the 'fill_storage' test utility produces a working Storage
object with at least some Content, Revision and Directory in it"""
data
=
load_repo_data
(
"cmdbts2"
)
fill_storage
(
swh_storage
,
data
)
assert
swh_storage
assert
swh_storage
.
content_get_random
()
assert
swh_storage
.
directory_get_random
()
assert
swh_storage
.
revision_get_random
()
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Fri, Jul 4, 11:56 AM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3266067
Attached To
rDPROV Provenance database
Event Timeline
Log In to Comment