Commit ad0a7d30 by Alexander Kryklia

tests and test plan

parent e2104820
......@@ -37,7 +37,7 @@ class Test_PositionsCompare(unittest.TestCase):
self.assertEqual(PositionsCompare([3.5, 4.5]), PositionsCompare([5, 7]))
class Test_DragAndDrop(unittest.TestCase):
class Test_DragAndDrop_Grade(unittest.TestCase):
def test_targets_true(self):
user_input = '{"use_targets": true, "draggables": [{"1": "t1"}, \
......@@ -136,7 +136,7 @@ class Test_DragAndDrop(unittest.TestCase):
],
'rule': 'anyof'
}, {
'draggables': ['7','8', '9', '10'],
'draggables': ['7', '8', '9', '10'],
'targets': ['p_left_1', 'p_left_2', 'p_right_1','p_right_2'],
'rule': 'anyof'
}, {
......@@ -175,7 +175,7 @@ class Test_DragAndDrop(unittest.TestCase):
],
'rule': 'anyof'
}, {
'draggables': ['7','8', '9', '10'],
'draggables': ['7', '8', '9', '10'],
'targets': ['p_left_1', 'p_left_2', 'p_right_1','p_right_2'],
'rule': 'anyof'
}, {
......@@ -199,14 +199,37 @@ class Test_DragAndDrop(unittest.TestCase):
self.assertFalse(draganddrop.grade(user_input, correct_answer))
class Test_DragAndDrop_Populate(unittest.TestCase):
#test for every function in DND
# test for different denied-allowed positions inised
# different groups
def test1(self):
self.assertTrue(1)
class Test_DraAndDrop_Compare_Positions(unittest.TestCase):
def test_exact_1(self):
self.assertTrue(1)
def test_exact_2(self):
self.assertTrue(1)
def test_anyof_1(self):
self.assertTrue(1)
def test_anyof_2(self):
self.assertTrue(1)
def test_5(self):
self.assertTrue(1)
def suite():
testcases = [Test_DragAndDrop]
testcases = [Test_PositionsCompare,
Test_DragAndDrop_Populate,
Test_DragAndDrop_Grade,
Test_DraAndDrop_Compare_Positions]
suites = []
for testcase in testcases:
suites.append(unittest.TestLoader().loadTestsFromTestCase(testcase))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment