def test_get_doc_shelf(self): with patch('app.input') as in_mock: in_mock.return_value = '11-2' shelf_number = app.get_doc_shelf() self.assertEqual(shelf_number, '1') in_mock.return_value = '10006' shelf_number = app.get_doc_shelf() self.assertNotEqual(shelf_number, '1')
def test_get_doc_shelf(self): user_input = ['10006'] with patch('app.input', side_effect=user_input): directory_number = app.get_doc_shelf() self.assertEqual(directory_number, '2') user_input = ['11111'] with patch('app.input', side_effect=user_input): directory_number = app.get_doc_shelf() self.assertFalse(directory_number)
def testing_get_doc_shelf(self): correct_number = '2' with patch('app.input', return_value=f'{self.dirs["2"][0]}'): shelf_to_check = app.get_doc_shelf() self.assertIs(correct_number, shelf_to_check)
def test_get_doc_shelf(self, mock_doc_number): mock_doc_number.return_value = '10006' result = get_doc_shelf() self.assertEqual('2', result)
def test_get_doc_shelf(self): with patch('app.input', return_value='10006'): self.assertIs(app.get_doc_shelf(), '2')
def test_document_add(self): self.assertEqual(add_new_doc(), 'test') self.assertEqual(get_doc_shelf(), 'test')
def test_get_doc_shelf(self): with patch('app.input', return_value='not exs'): self.assertIsNone(app.get_doc_shelf()) with patch('app.input', return_value='11-2'): self.assertEqual(app.get_doc_shelf(), '1')
def test_get_doc_shelf(self, mock_input): result = get_doc_shelf() assert result == '2'
def test_get_value(self): self.assertMultiLineEqual(app.get_doc_owner_name(), 'Аристарх Павлов') self.assertEqual(app.get_doc_shelf(), '2')
def test_get_doc_shelf(self, mock_input): for shelf, doc_list in app.directories.items(): if AppTester.test_doc_number in doc_list: self.assertEqual(app.get_doc_shelf(), shelf) break
def test_get_doc_shelf(self): right_number = '2' with patch('app.input', return_value=f'{self.dirs["2"][0]}'): check = app.get_doc_shelf() self.assertIs(right_number, check)
def test_get_doc_shelf(self): self.assertTrue(app.check_document_existance("10006")) with patch('app.input', return_value="10006"): self.assertEqual(app.get_doc_shelf(), '2')
def test_get_doc_shelf(self): doc_number = documents[0]['number'] with patch('app.input', return_value=doc_number): self.assertEqual(app.get_doc_shelf(), '1')
def test_get_doc_shelf(self): doc_number = '10006' with patch('app.input', return_value=doc_number): result = app.get_doc_shelf() self.assertIn(result, app.directories.keys())
def test_get_doc_shelf(self, doc_num, etalon_result): result = app.get_doc_shelf(doc_num) assert result == etalon_result
def test_get_doc_shelf(self, input_mock): directori_number = get_doc_shelf() real_number = '1' self.assertEqual(directori_number, real_number)
def test_get_doc_shelf_good(self): self.assertEqual(app.get_doc_shelf(), '1')
def test_get_doc_shelf(self): with patch('app.input', return_value='2207 876234') as _: self.assertEqual(app.get_doc_shelf(), '1')
def test_get_doc_shelf_bad(self): self.assertEqual(app.get_doc_shelf(), None)
def test_4(self, input): with mock.patch('app.directories', self.directories): resalt = get_doc_shelf() self.assertEqual('2', resalt)
def test_move_doc_to_shelf(self): with patch('app.input', side_effect=['10006', '2']): app.move_doc_to_shelf() with patch('app.input', return_value='10006'): dir = app.get_doc_shelf() self.assertEqual(dir, '2')
def test_get_doc_shelf(self): with patch('app.input', return_value='2207 876234'): shelf_number = app.get_doc_shelf() self.assertEqual(shelf_number, '1')
def test_get_doc_shelf(self): self.assertTrue(app.get_doc_shelf())
def test_get_doc_shelf(self): with patch('app.input', return_value=app.documents[len(app.documents) - 1].get('number')): shelf_num = app.get_doc_shelf() self.assertIsInstance(shelf_num, str)
def test_get_doc_shelf(self): with patch('app.input', return_value='11-2'): self.assertEqual('1', app.get_doc_shelf())