@defer.inlineCallbacks
    def test_send_with_inurl_dlr(self):
        params = {'username': self.username,
                  'password': 'correct',
                  'to': '06155423',
                  'content': 'anycontent'}

        # URL definitions
        valid_urls = {'http://127.0.0.1/receipt',
                      'http://127.0.0.1:99/receipt',
                      'https://127.0.0.1/receipt',
                      'https://127.0.0.1:99/receipt',
                      'https://127.0.0.1/receipt.html',
                      'https://127.0.0.1:99/receipt.html',
                      'http://www.google.com/receipt',
                      'http://www.google.com:99/receipt',
                      'http://www.google.com/receipt.html',
                      'http://www.google.com:99/receipt.html',
                      'http://www.google.com/',
                      'http://www.google.com:99/',
                      'http://www.google.com',
                      'http://www.google.com:99'}

        import time
        for params['dlr-url'] in valid_urls:
            response = yield self.web.get("send", params)

            self.assertEqual(response.responseCode, 500)
            self.assertEqual(response.value(), "Error \"Cannot send submit_sm, check SMPPClientManagerPB log file for details\"")

        # URL definitions
        invalid_urls = {'ftp://127.0.0.1/receipt',
                      'smtp://127.0.0.1:99/receipt',
                      'smpp://127.0.0.1/receipt',
                      '127.0.0.1:99',
                      'www.google.com',
                      'www.google.com:99/'}

        for params['dlr-url'] in invalid_urls:
            response = yield self.web.get("send", params)

            self.assertEqual(response.responseCode, 400)
            self.assertEqual(response.value(), params['dlr-url'] % "Error \"Argument [dlr-url] has an invalid value: [%s].\"")
dataset/ETHPy150Open jookies/jasmin/jasmin/protocols/http/test/test_server.py/SendTestCases.test_send_with_inurl_dlr/swapped operands of `%`