mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-09-28 14:45:23 +00:00
Basic testcase setup
This commit is contained in:
4
pytest.ini
Normal file
4
pytest.ini
Normal file
@@ -0,0 +1,4 @@
|
||||
[pytest]
|
||||
testpaths = tests
|
||||
python_files=test*.py
|
||||
addopts = -v --verbose
|
15
tests/tests.py
Normal file
15
tests/tests.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from restic_volume_backup import utils
|
||||
|
||||
|
||||
def list_containers():
|
||||
return {}
|
||||
|
||||
|
||||
@mock.patch('restic_volume_backup.utils.list_containers', list_containers)
|
||||
class ResticBackupTests(unittest.TestCase):
|
||||
|
||||
def test_stuff(self):
|
||||
assert utils.list_containers() == {}
|
Reference in New Issue
Block a user