forked from benevolentprof/inf1340_2015_asst3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_exercise2.py
42 lines (33 loc) · 887 Bytes
/
test_exercise2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python3
""" Module to test papers.py """
__author__ = 'Susan Sim'
__email__ = "ses@drsusansim.org"
__copyright__ = "2015 Susan Sim"
__license__ = "MIT License"
# imports one per line
import pytest
import os
from exercise2 import *
DIR = "test_jsons/"
os.chdir(DIR)
def test_returning():
"""
Travellers are returning to KAN.
"""
assert decide("test_returning_citizen.json", "countries.json") ==\
["Accept", "Accept", "Quarantine"]
def test_quarantine():
"""
Quarantine traveller
"""
assert decide("test_quarantine.json","countries.json") == ["Quarantine"]
def test_visa():
"""
Expired visa traveller
"""
assert decide("test_visa.json","countries.json") == ["Reject"]
def test_country():
"""
Non existent country traveller
"""
assert decide("test_country.json","countries.json") == ["Reject"]