Ejemplo n.º 1
0
 def test_name_empty_4(self, mock_obj):
     #inputs
     inputs = ['12','']
     with patch('builtins.input', side_effect=inputs):
                 add_subject()
     result = mock_obj.getvalue().strip()
     self.assertEqual(self.name_empty,result)
Ejemplo n.º 2
0
 def test_code_repeat_5(self,mock_obj):
     # inputs
     inputs = ['123', 'physic']
     subjects.append(create_subject('123','math'))
     with patch('builtins.input', side_effect=inputs):
         add_subject()
     result = mock_obj.getvalue().strip()
     self.assertEqual(result,self.code_repeat)