def test_eq_when_other_has_same_cb(self): s = SyncWrapper('cb') other = SyncWrapper('cb') another = SyncWrapper('bb') assert_equals(s, other) assert_not_equals(s, another)
def test_call(self): cb = mock() s = SyncWrapper(cb) expect(cb).args('foo', 'bar', hello='mars') s('foo', 'bar', hello='mars') assert_false(s._read)
def test_eq_when_other_is_same_cb(self): s = SyncWrapper('cb') assert_equals('cb', s) assert_not_equals('bb', s)
def test_init(self): s = SyncWrapper('cb') assert_equals('cb', s._cb) assert_true(s._read) assert_equals(None, s._result)