예제 #1
0
    def test_delete_doc(self):
        self.assertTrue(app.check_document_existance("11-2"))  # check before deleting doc

        with patch('app.input', return_value="11-2") as child1:
            app.delete_doc()

        self.assertFalse(app.check_document_existance("11-2"))  # check after deleting doc
예제 #2
0
    def test_delete_doc(self):
        self.assertTrue(app.check_document_existance("11-2"))

        with patch('app.input', return_value="11-2"):
            app.delete_doc()

        self.assertFalse(app.check_document_existance("11-2"))
예제 #3
0
    def test_show_all_docs_info(self):  # L
        new_doc_number = '2207 876234'
        new_doc_number2 = '11-2'
        new_doc_number3 = '10006'

        self.assertEqual(check_document_existance(new_doc_number), True)
        self.assertEqual(check_document_existance(new_doc_number2), True)
        self.assertEqual(check_document_existance(new_doc_number3), True)
예제 #4
0
    def test_delete_doc(self):
        # создадим, чтобы было что удалять
        new_doc = {"type": 'INN', "number": '123', "name": 'Ivan Petrov'}

        new_doc_number = '123'
        new_doc_shelf_number = '10'

        documents.append(new_doc)
        append_doc_to_shelf(new_doc_number, new_doc_shelf_number)

        # проверяем, что оно создалось
        self.assertEqual(check_document_existance(new_doc_number), True)

        # удаляем, что только что создали и проверяем, что оно удалилось
        print('Для теста скопируйте значение номера: 123')
        self.assertEqual(delete_doc(), (new_doc_number, True))
 def test_get_doc_owner_name(self):
     self.assertTrue(app.check_document_existance(documents[1]['number']))
     with patch('app.input', return_value=documents[1]['number']):
         self.assertEqual(app.get_doc_owner_name(), documents[1]['name'])
예제 #6
0
 def test_check_value(self):
     self.assertTrue(app.check_document_existance('10006'))
     self.assertFalse(app.check_document_existance('0a0a0a0a'))
예제 #7
0
 def test_check_document_existance(self):
     doc_founded = app.check_document_existance('10006')
     self.assertTrue(doc_founded)
예제 #8
0
 def test_check_document_existance(self):
     user_doc_number = '2207 876234'
     app.check_document_existance(user_doc_number=user_doc_number)
     self.assertTrue(user_doc_number)
예제 #9
0
 def test_check_document_existance_failed(self):
     self.assertFalse(check_document_existance('-'))
예제 #10
0
 def test_check_doc_existance(self):
     self.assertTrue(app.check_document_existance('10006'))
예제 #11
0
 def test_check_document_existance(self):
     assert check_document_existance('11-2') == True
예제 #12
0
 def test_check_document_existance(self):
     with patch("app.input", return_value="11-2"):
         doc_founded = app.check_document_existance(self.documents)
         self.assertTrue(doc_founded)
예제 #13
0
 def test_check_document_existance(self, mock_doc_number):
     mock_doc_number.return_value = True
     document = '11-2'
     result = check_document_existance(document)
     self.assertEqual(result, True)
예제 #14
0
 def test_delete_doc(self):
     doc_number = '10006'
     with patch('app.input', return_value=doc_number):
         app.delete_doc()
     self.assertFalse(app.check_document_existance(doc_number))
예제 #15
0
 def test_check_document_existance(self):
     self.assertIn('10006', [doc['number'] for doc in app.documents])
     result = app.check_document_existance('10006')
     self.assertTrue(result)
예제 #16
0
 def test_negative_check_document_existance(self):
     self.assertNotIn('555', [doc['number'] for doc in app.documents])
     result = app.check_document_existance('555')
     self.assertFalse(result)
예제 #17
0
 def test_is_doc_exists(self):
     doc_number = app.check_document_existance('11-2')
     self.assertTrue(doc_number)
예제 #18
0
 def test_is_doc_not_exists(self):
     doc_number = app.check_document_existance('112')
     self.assertFalse(doc_number)
예제 #19
0
 def test_check_document_existance(self):
     exist = app.check_document_existance('2207 876234')
     self.assertTrue(exist)
     exist = app.check_document_existance('2207876234')
     self.assertFalse(exist)
 def test_delete_doc(self):
     del_doc_number = documents[1]['number']
     self.assertTrue(app.check_document_existance(del_doc_number))
     with patch('app.input', return_value=del_doc_number):
         app.delete_doc()
     self.assertFalse(app.check_document_existance(del_doc_number))
예제 #21
0
 def testing_check_document_existance(self):
     presence = app.check_document_existance('2207 876234')
     self.assertTrue(presence)
     presence = app.check_document_existance('2207876234')
     self.assertFalse(presence)
예제 #22
0
 def test_check_documents_existance(self):
     self.assertTrue(app.check_document_existance('11-2'))
예제 #23
0
    def test_check_document_existance(self):
        self.assertTrue(app.check_document_existance('11-2'))

        self.assertFalse(app.check_document_existance('not exs'))
예제 #24
0
 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')
예제 #25
0
파일: test_01.py 프로젝트: lapssh/Netology
 def test_check_document_existance(self):
     """Проверка наличия валидного документа, и отсутствия невалидного"""
     self.assertEqual(app.check_document_existance('11-2'), True)
     self.assertNotEqual(app.check_document_existance('левый документ, которого нет'), True)
예제 #26
0
파일: __init__.py 프로젝트: SheLily/Tests
 def test_check_document_existance(self):
     self.assertTrue(app.check_document_existance('2207 876234'))
     self.assertFalse(app.check_document_existance('88005553535'))
예제 #27
0
 def test_check_document_existance(self):
     check_false = app.check_document_existance('999999999999999999')
     check_true = app.check_document_existance(
         app.documents[0].get('number'))
     self.assertFalse(check_false)
     self.assertTrue(check_true)
예제 #28
0
 def test_check_document_existance_success(self):
     self.assertTrue(check_document_existance('2207 876234'))