-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
46 lines (38 loc) · 1.24 KB
/
test.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
43
44
45
46
import unittest
from models import *
from dumpy import Dumpy
from utils import DumpyfileUtils
class DumpyTests(unittest.TestCase):
@staticmethod
@unittest.skip
def test_example():
dumpy = Dumpy()
metadata = Metadata(
description="An example .dumpy file.",
shuffle_answers=True
)
questions = [
Question(
text="What year is it?",
answers=[
Answer(text=2015),
Answer(text=2016),
Answer(text=2017),
Answer(text=2018),
Answer(text=2019, is_correct=True)
],
postmortem="It's 2019!"
),
Question(
text="Which of these are numbers?",
answers=[
Answer(text="A"),
Answer(text="B"),
Answer(text=1, is_correct=True),
Answer(text=2, is_correct=True)
],
postmortem="'A' and 'B' are letters, but 1 and 2 are numbers."
)
]
DumpyfileUtils.create(metadata, questions, dumpy.dumpyfile_path) # todo: test this
dumpy.execute_braindump()