From 6e5fe0631f4330fca17ec540376add3908d689a1 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 28 Jul 2015 21:59:53 -0400 Subject: [PATCH] Test: Now sets rc.json.depends.array=off for testing --- test/import.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/import.t b/test/import.t index abbbcd020..10908c7da 100755 --- a/test/import.t +++ b/test/import.t @@ -42,6 +42,7 @@ class TestImport(TestCase): self.t = Task() self.t.config("dateformat", "m/d/Y") + # Multiple tasks. self.data1 = """[ {"uuid":"a0000000-a000-a000-a000-a00000000000","description":"zero","project":"A","status":"pending","entry":"1234567889"}, {"uuid":"a1111111-a111-a111-a111-a11111111111","description":"one","project":"B","status":"pending","entry":"1234567889"}, @@ -49,9 +50,11 @@ class TestImport(TestCase): ] """ + # Single task. self.data2 = """{"uuid":"44444444-4444-4444-4444-444444444444","description":"three","status":"pending","entry":"1234567889"} """ + # Free-form JSON. self.data3 = """ { @@ -72,7 +75,6 @@ class TestImport(TestCase): "1234567889" } - """ def assertData1(self): @@ -190,6 +192,7 @@ class TestImport(TestCase): _data = """{"uuid":"a0000000-a000-a000-a000-a00000000000","depends":"a1111111-a111-a111-a111-a11111111111","description":"zero","project":"A","status":"pending","entry":"1234567889"}""" self.t("import", input=self.data1) self.t("import", input=_data) + self.t.config("json.depends.array", "off") _t = self.t.export("a0000000-a000-a000-a000-a00000000000")[0] self.assertEqual(_t["depends"], "a1111111-a111-a111-a111-a11111111111")