summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/analysis/cattribs.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/tests/analysis/cattribs.py b/tests/analysis/cattribs.py
index 1a7f7da..e388afc 100644
--- a/tests/analysis/cattribs.py
+++ b/tests/analysis/cattribs.py
@@ -15,10 +15,10 @@ class TestProjectFeatures(ChrysalideTestCase):
def testEmptyContentAttributeSet(self):
"""Check properties of empty content attribute set."""
- attribs = ContentAttributes('')
- self.assertIsNotNone(attribs)
+ attribs, filename = ContentAttributes('')
- self.assertIsNone(attribs.filename)
+ self.assertIsNotNone(attribs)
+ self.assertIsNone(filename)
self.assertEqual(len(attribs.keys), 0)
@@ -33,16 +33,16 @@ class TestProjectFeatures(ChrysalideTestCase):
'dddd': '3',
}
- filename = 'filename'
- path = filename
+ orig_filename = 'filename'
+ path = orig_filename
for k in model.keys():
path += '&%s=%s' % (k, model[k])
- attribs = ContentAttributes(path)
- self.assertIsNotNone(attribs)
+ attribs, filename = ContentAttributes(path)
- self.assertEqual(attribs.filename, filename)
+ self.assertIsNotNone(attribs)
+ self.assertEqual(orig_filename, filename)
kcount = 0
@@ -73,10 +73,10 @@ class TestProjectFeatures(ChrysalideTestCase):
for k in model.keys():
path += '&e%s=%s' % (k, model[k])
- attribs = ContentAttributes(path)
- self.assertIsNotNone(attribs)
+ attribs, filename = ContentAttributes(path)
- self.assertIsNone(attribs.filename)
+ self.assertIsNotNone(attribs)
+ self.assertIsNone(filename)
kcount = 0
@@ -92,31 +92,31 @@ class TestProjectFeatures(ChrysalideTestCase):
path = '&&'
- attribs = ContentAttributes(path)
- self.assertIsNotNone(attribs)
+ attribs, filename = ContentAttributes(path)
- self.assertIsNone(attribs.filename)
+ self.assertIsNotNone(attribs)
+ self.assertIsNone(filename)
self.assertEqual(len(attribs.keys), 0)
path = '&&&'
- attribs = ContentAttributes(path)
- self.assertIsNotNone(attribs)
+ attribs, filename = ContentAttributes(path)
- self.assertIsNone(attribs.filename)
+ self.assertIsNotNone(attribs)
+ self.assertIsNone(filename)
self.assertEqual(len(attribs.keys), 0)
path = 'filename'
- attribs = ContentAttributes(path)
+ attribs, filename = ContentAttributes(path)
+
self.assertIsNotNone(attribs)
+ self.assertEqual(filename, path)
self.assertEqual(len(attribs.keys), 0)
- self.assertEqual(attribs.filename, path)
-
def testContentAttributesKeyAccess(self):
"""Test some access keys for content attributes."""
@@ -130,7 +130,7 @@ class TestProjectFeatures(ChrysalideTestCase):
for k in model.keys():
path += '&%s=%s' % (k, model[k])
- attribs = ContentAttributes(path)
+ attribs, _ = ContentAttributes(path)
self.assertIsNotNone(attribs)
with self.assertRaisesRegex(Exception, 'key must be a string value'):