diff options
author | Gustavo Niemeyer <gustavo@niemeyer.net> | 2010-06-20 12:49:20 -0300 |
---|---|---|
committer | Gustavo Niemeyer <gustavo@niemeyer.net> | 2010-06-20 12:49:20 -0300 |
commit | f7ee6d1b32656d7143b9b02ce1afe0f7fa56dde9 (patch) | |
tree | 29543dd47697326df8b111f17f267f2dae1228ca /test.py | |
parent | 16f4771d2442b0438e7b245662f9f66e66790d72 (diff) | |
download | mocker-f7ee6d1b32656d7143b9b02ce1afe0f7fa56dde9.tar.gz |
Use the more reliable expect() automatically with MockerTestCase.
Diffstat (limited to 'test.py')
-rwxr-xr-x | test.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -294,7 +294,12 @@ class MockerTestCaseTest(TestCase): self.assertEquals(type(self.test.mocker), Mocker) def test_has_expect(self): - self.assertTrue(self.test.expect is expect) + self.assertTrue(issubclass(self.test.expect, expect)) + + def test_expect_works_with_non_mocks(self): + # We must be using the Expect helper for this to work at all: + obj = self.test.mocker.mock() + self.test.expect(iter(obj)).generate([1,2,3]) def test_attributes_are_the_same(self): class MyTest(MockerTestCase): |