test(backup): make a testfile to backup

This commit is contained in:
Houkime 2023-02-03 19:09:24 +00:00
parent b6650b52c3
commit d5e0a3894b

View file

@ -1,4 +1,5 @@
import pytest import pytest
import os.path as path
from selfprivacy_api.services.test_service import DummyService 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 from selfprivacy_api.graphql.queries.providers import BackupProvider
TESTFILE_BODY = "testytest!"
@pytest.fixture() @pytest.fixture()
def test_service(tmpdir): 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) return DummyService(tmpdir)