Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_main_succeeds_when_vcard_validator_returns_nothing(self, vcard_validator_mock, parse_arguments_mock):
parse_arguments_mock.return_value = ARGUMENTS_WITH_PATH
vcard_validator_mock.return_value.result = None
self.assertEqual(0, vcard.main())
def test_parse_arguments_succeeds_with_multiple_paths(self):
path1 = '/some/path'
path2 = '/other/path'
arguments = [path1, path2]
expected_paths = arguments
actual_paths = vcard.parse_arguments(arguments).paths
self.assertEqual(expected_paths, actual_paths)
def test_doc(self):
"""Run DocTests"""
self.assertEqual(doctest.testmod(vcard)[0], 0)
self.assertEqual(doctest.testmod(vcard_definitions)[0], 0)
self.assertEqual(doctest.testmod(vcard_errors)[0], 0)
self.assertEqual(doctest.testmod(vcard_utils)[0], 0)
self.assertEqual(doctest.testmod(vcard_validators)[0], 0)