summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-04-05 11:30:02 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-04-05 11:42:24 -0400
commit9a10880166445bafcc80e8c89057e48876359e5a (patch)
tree48b4998ced40fd1fad0f863aee81e28439b4d2b9 /testsuite
parentb92f31c2768850f67149b92514c10c881aeb6d56 (diff)
downloadbcfg2-9a10880166445bafcc80e8c89057e48876359e5a.tar.gz
bcfg2-9a10880166445bafcc80e8c89057e48876359e5a.tar.bz2
bcfg2-9a10880166445bafcc80e8c89057e48876359e5a.zip
File: handle Path type="file" entries with no text content even if empty is not set
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py
index 662e0e1b6..8f933e08f 100644
--- a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py
+++ b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py
@@ -64,10 +64,18 @@ class TestPOSIXFile(TestPOSIXTool):
self.assertEqual(ptool._get_data(entry), ("test", True))
entry = copy.deepcopy(orig_entry)
+ entry.set("encoding", "base64")
+ entry.set("empty", "true")
+ self.assertEqual(ptool._get_data(entry), ("", True))
+
+ entry = copy.deepcopy(orig_entry)
entry.set("empty", "true")
self.assertEqual(ptool._get_data(entry), ("", False))
entry = copy.deepcopy(orig_entry)
+ self.assertEqual(ptool._get_data(entry), ("", False))
+
+ entry = copy.deepcopy(orig_entry)
entry.text = "test"
self.assertEqual(ptool._get_data(entry), ("test", False))