mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-05 11:03:12 +00:00
test(backups): test repo init
This commit is contained in:
parent
bd744ba211
commit
865c8f5280
|
@ -16,7 +16,7 @@ REPO_NAME = "test_backup"
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture()
|
@pytest.fixture()
|
||||||
def test_service(tmpdir):
|
def test_service(tmpdir, backups):
|
||||||
testile_path = path.join(tmpdir, "testfile.txt")
|
testile_path = path.join(tmpdir, "testfile.txt")
|
||||||
with open(testile_path, "w") as file:
|
with open(testile_path, "w") as file:
|
||||||
file.write(TESTFILE_BODY)
|
file.write(TESTFILE_BODY)
|
||||||
|
@ -25,7 +25,9 @@ def test_service(tmpdir):
|
||||||
class TestDummyService(DummyService, location=tmpdir):
|
class TestDummyService(DummyService, location=tmpdir):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return TestDummyService()
|
service = TestDummyService()
|
||||||
|
backups.init_repo(service)
|
||||||
|
return service
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture()
|
@pytest.fixture()
|
||||||
|
|
Loading…
Reference in a new issue