test(backup): make a testfile to backup

restic-rewrite-api
Houkime 2023-02-03 19:09:24 +00:00
parent e54224f15d
commit 90c2524800
1 changed files with 7 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import pytest
import os.path as path
from selfprivacy_api.services.test_service import DummyService
@ -9,8 +10,14 @@ from selfprivacy_api.backup.providers.backblaze import Backblaze
from selfprivacy_api.graphql.queries.providers import BackupProvider
TESTFILE_BODY = "testytest!"
@pytest.fixture()
def test_service(tmpdir):
testile_path = path.join(tmpdir, "testfile.txt")
with open(testile_path, "w") as file:
file.write(TESTFILE_BODY)
return DummyService(tmpdir)