def test_404(self):
        expected_response = 'Bad bad bad...'
        handler = self.start_server([(404, [], expected_response)])

        try:
            try:
                urllib2.urlopen(handler.port % 'http://localhost:%s/weeble')
            except urllib2.URLError, f:
                pass
            else:
                self.fail('404 should raise URLError')

            data = f.read()
            f.close()

            self.assertEqual(data, expected_response)
            self.assertEqual(handler.requests, ['/weeble'])
        finally:
            self.server.stop()
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_urllib2_localnet.py/TestUrlopen.test_404/swapped operands of `%`