aboutsummaryrefslogtreecommitdiffstats
path: root/tests/otherbinding/collector_external_operator_test.py
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-03-30 14:37:23 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-03-31 11:26:40 -0300
commit72647558891dff9d80aa9013f3bd6a82fe53753e (patch)
tree57e19e267ea44271c86dfc275e16b62ecec879b4 /tests/otherbinding/collector_external_operator_test.py
parent60b8cc95b2ef28d7e253b813f0db0d31cb8ae845 (diff)
Extended extended reverse shift operator test.
Just added the basic case of "Collector << ObjectType".
Diffstat (limited to 'tests/otherbinding/collector_external_operator_test.py')
-rw-r--r--tests/otherbinding/collector_external_operator_test.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/otherbinding/collector_external_operator_test.py b/tests/otherbinding/collector_external_operator_test.py
index 28b2d65d7..58a23d2b0 100644
--- a/tests/otherbinding/collector_external_operator_test.py
+++ b/tests/otherbinding/collector_external_operator_test.py
@@ -26,21 +26,27 @@
'''Test cases for Collector shift operators defined in other modules.'''
-import sys
import unittest
-from sample import Collector
+from sample import Collector, ObjectType
from other import OtherObjectType
class CollectorOtherObjectType(unittest.TestCase):
'''Test cases for Collector << OtherObjectType'''
+ def testLShiftWithExpectedType(self):
+ '''Collector << ObjectType # libsample << operator'''
+ collector = Collector()
+ obj = ObjectType()
+ collector << obj
+ self.assertEqual(collector.items()[0], obj.identifier())
+
def testOtherReversal(self):
'''Collector << OtherObjectType # libother << operator'''
collector = Collector()
obj = OtherObjectType()
collector << obj
- self.assertEqual(collector.items()[0], obj.identifier()*2)
+ self.assertEqual(collector.items()[0], obj.identifier() * 2)
if __name__ == '__main__':
unittest.main()