From 0320a0bb8716e81519031913eae8f1eae7c79627 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Thu, 18 Feb 2016 15:26:50 +0300 Subject: [PATCH] test update --- tests/tests.py | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/tests/tests.py b/tests/tests.py index 2215358..7e8d628 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -1,9 +1,36 @@ from src.settings import Settings +from src.tox import Tox +import sys +import os class TestSettings(): - + def test_creation(self): s = Settings() assert s['ipv6_enabled'] is not None assert s['notifications'] is not None + + def test_with_delete(self): + path = Settings.get_default_path() + 'toxygen.json' + os.remove(path) + Settings() + assert os.path.exists(path) + + +class TestTox(): + + def test_creation(self): + try: + tox = Tox('tox_save') + assert tox.tox_options is not None + del tox + except: + assert 0 + + def test_init(self): + try: + tox = Tox('tox_save') + assert tox.get_savedata_size() + except: + assert 0