async def test_iter(self): citation1 = Mock(Citation) citation2 = Mock(Citation) sut = _Citer() sut.cite(citation1) sut.cite(citation2) self.assertEquals([(1, citation1), (2, citation2)], list(sut))
async def test_len(self): citation1 = Mock(Citation) citation2 = Mock(Citation) sut = _Citer() sut.cite(citation1) sut.cite(citation2) self.assertEquals(2, len(sut))
async def test_cite(self): citation1 = Mock(Citation) citation2 = Mock(Citation) sut = _Citer() self.assertEquals(1, sut.cite(citation1)) self.assertEquals(2, sut.cite(citation2)) self.assertEquals(1, sut.cite(citation1))