From 8d392f89a6b7e786449438db0f54d81e1fdcf54b Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Mon, 15 Apr 2019 19:07:14 +0200 Subject: [PATCH] Basic testcase setup --- pytest.ini | 4 ++++ tests/tests.py | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 pytest.ini create mode 100644 tests/tests.py diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..6e31137 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,4 @@ +[pytest] +testpaths = tests +python_files=test*.py +addopts = -v --verbose diff --git a/tests/tests.py b/tests/tests.py new file mode 100644 index 0000000..3f1b790 --- /dev/null +++ b/tests/tests.py @@ -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() == {}