summaryrefslogtreecommitdiff
path: root/tests/test_containers.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_containers.py')
-rw-r--r--tests/test_containers.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_containers.py b/tests/test_containers.py
index 797c480..7c8d829 100644
--- a/tests/test_containers.py
+++ b/tests/test_containers.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2010 Mark Sandstrom
-# Copyright (c) 2011 Raphaël Barrois
+# Copyright (c) 2011-2013 Raphaël Barrois
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -242,7 +242,7 @@ class AttributeBuilderTestCase(unittest.TestCase):
self.assertEqual({'one': 2}, ab.build(create=False))
def test_factory_defined_sequence(self):
- seq = declarations.Sequence(lambda n: 'xx' + n)
+ seq = declarations.Sequence(lambda n: 'xx%d' % n)
class FakeFactory(object):
@classmethod
@@ -259,7 +259,7 @@ class AttributeBuilderTestCase(unittest.TestCase):
self.assertEqual({'one': 'xx1'}, ab.build(create=False))
def test_additionnal_sequence(self):
- seq = declarations.Sequence(lambda n: 'xx' + n)
+ seq = declarations.Sequence(lambda n: 'xx%d' % n)
class FakeFactory(object):
@classmethod
@@ -276,8 +276,8 @@ class AttributeBuilderTestCase(unittest.TestCase):
self.assertEqual({'one': 1, 'two': 'xx1'}, ab.build(create=False))
def test_replaced_sequence(self):
- seq = declarations.Sequence(lambda n: 'xx' + n)
- seq2 = declarations.Sequence(lambda n: 'yy' + n)
+ seq = declarations.Sequence(lambda n: 'xx%d' % n)
+ seq2 = declarations.Sequence(lambda n: 'yy%d' % n)
class FakeFactory(object):
@classmethod
@@ -331,7 +331,7 @@ class AttributeBuilderTestCase(unittest.TestCase):
ab = containers.AttributeBuilder(FakeFactory, {'one__blah': 1, 'two__bar': 2})
self.assertTrue(ab.has_subfields(sf))
- self.assertEqual(['one'], ab._subfields.keys())
+ self.assertEqual(['one'], list(ab._subfields.keys()))
self.assertEqual(2, ab._attrs['two__bar'])
def test_sub_factory(self):