Example #1
0
 def test_child_programs_many_children(self):
     expected_children = [
         self.child_1,
         self.grandchild_1,
         self.child_2,
         self.grandchild_2,
         self.grandchild_3,
     ]
     self.assertEqual(expected_children, child_programs(self.complex_program))
Example #2
0
 def test_child_programs_many_children(self):
     expected_children = [
         self.child_1,
         self.grandchild_1,
         self.child_2,
         self.grandchild_2,
         self.grandchild_3,
     ]
     assert expected_children == child_programs(self.complex_program)
Example #3
0
 def test_child_programs_one_child(self):
     self.assertEqual([self.grandchild_1],
                      child_programs(self.simple_program))
Example #4
0
 def test_child_programs_no_children(self):
     self.assertEqual([], child_programs(self.empty_program))
Example #5
0
 def test_child_programs_no_curriculum(self):
     program = {
         'title': 'notice that I do not have a curriculum',
     }
     self.assertEqual([], child_programs(program))
Example #6
0
 def test_child_programs_one_child(self):
     assert [self.grandchild_1] == child_programs(self.simple_program)
Example #7
0
 def test_child_programs_no_children(self):
     assert not child_programs(self.empty_program)
Example #8
0
 def test_child_programs_no_curriculum(self):
     program = {
         'title': 'notice that I do not have a curriculum',
     }
     assert not child_programs(program)