def test_repr(self):
        mock = Mock(name='foo')
        self.assertIn('foo', repr(mock))
        self.assertIn("'%s'" % id(mock), repr(mock))

        mocks = [(Mock(), 'mock'), (Mock(name='bar'), 'bar')]
        for mock, name in mocks:
            self.assertIn('%s.bar' % name, repr(mock.bar))
            self.assertIn('%s.foo()' % name, repr(mock.foo()))
            self.assertIn('%s.foo().bing' % name, repr(mock.foo().bing))
            self.assertIn('%s()' % name, repr(mock()))
            self.assertIn('%s()()' % name, repr(mock()()))
            self.assertIn(name % '%s()().foo.bar.baz().bing',
                          repr(mock()().foo.bar.baz().bing))
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/unittest/test/testmock/testmock.py/MockTest.test_repr/swapped operands of `%`