def test_returns_self(self): manager = make_manager() inst = ManagerMock(manager, 'foo') self.assertEquals(inst.all(), inst)
def test_iter_exception(self): manager = make_manager() inst = ManagerMock(manager, Exception()) self.assertRaises(Exception, list, inst.all())
def test_getitem(self): manager = make_manager() inst = ManagerMock(manager, 'foo') self.assertEquals(inst.all()[0], 'foo')
def test_iter(self): manager = make_manager() inst = ManagerMock(manager, 'foo') self.assertEquals(list(inst.all()), ['foo'])
def test_returns_self(self): manager = make_manager() inst = ManagerMock(manager, 'foo') self.assertEquals(inst.all(), inst)
def test_getitem(self): manager = make_manager() inst = ManagerMock(manager, 'foo') self.assertEquals(inst.all()[0], 'foo')
def test_iter_exception(self): manager = make_manager() inst = ManagerMock(manager, Exception()) self.assertRaises(Exception, list, inst.all())
def test_iter(self): manager = make_manager() inst = ManagerMock(manager, 'foo') self.assertEquals(list(inst.all()), ['foo'])