def test_find_documents_by_name(self): """Test to check if we can find documents and display information""" self.new_documents.save_documents() new_test_documents = Documents("Twitter", "56789") new_test_documents.save_documents() found_document = Documents.find_by_name("Twitter") self.assertEqual(found_document.account_name, new_test_documents.account_name)
def check_existing_documents(name): """Method that checks whether a particular account and its documents exist based on searched account_name""" return Documents.find_by_name(name)
def find_document(account_name): """Function that finds documents based on account_name given""" return Documents.find_by_name(account_name)