mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Warn if an import contains multiple occurrences of the same UUID (#3560)
This commit is contained in:
parent
0650fe509f
commit
7ea4baed77
3 changed files with 28 additions and 1 deletions
|
@ -224,6 +224,15 @@ class TestImport(TestCase):
|
|||
code, out2, err = self.t("export")
|
||||
self.assertEqual(out1, out2)
|
||||
|
||||
def test_import_duplicate_uuid_in_input(self):
|
||||
"""Test import warns if input contains the same UUID twice."""
|
||||
_data = """[
|
||||
{"uuid":"a0000000-a000-a000-a000-a00000000000","description":"first description"},
|
||||
{"uuid":"a0000000-a000-a000-a000-a00000000000","description":"second description"}
|
||||
]"""
|
||||
_, _, err = self.t("import", input=_data)
|
||||
self.assertIn("Input contains UUID 'a0000000-a000-a000-a000-a00000000000' 2 times", err)
|
||||
|
||||
|
||||
class TestImportExportRoundtrip(TestCase):
|
||||
def setUp(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue