Basic testcase setup

This commit is contained in:
Einar Forselv 2019-04-15 19:07:14 +02:00
parent 97ed56feb9
commit 8d392f89a6
2 changed files with 19 additions and 0 deletions

4
pytest.ini Normal file
View File

@ -0,0 +1,4 @@
[pytest]
testpaths = tests
python_files=test*.py
addopts = -v --verbose

15
tests/tests.py Normal file
View 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() == {}