summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2018-02-19 18:04:22 +0100
committerYuval Adam <_@yuv.al>2018-02-19 18:04:22 +0100
commit1f9757df41340e142446b1762cb6149f6d4f7223 (patch)
treea76162e516a02f11fb1ce19da47c291b63604ac7 /tests
parent238bf5ef01ccc8428be733d188b055ff92046653 (diff)
More restructuring
Diffstat (limited to 'tests')
-rw-r--r--tests/test_core.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 3eed24c..6d4a8d5 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1,6 +1,6 @@
import pytest
-from viewstate import ViewState
+from viewstate import *
class TestViewState(object):
@@ -9,14 +9,13 @@ class TestViewState(object):
vs = ViewState()
assert not vs.is_valid()
- @pytest.mark.skip(reason='Missing test data')
def test_is_valid(self):
- with open('samples/ngcs.sample', 'r') as f:
+ with open('tests/samples/ngcs.sample', 'r') as f:
vs = ViewState(f.read())
- self.assertTrue(vs.is_valid())
+ assert vs.is_valid() is True
def test_invalid_decode(self):
- with pytest.raises(Exception):
+ with pytest.raises(ViewStateException):
vs = ViewState()
vs.raw = b'\x01\x02'
vs.decode()