Exemple #1
0
    def testSettingVersion(self):

        self.assertEqual(
            execute("--request", "--version", "HTTP/2.1"),
            (request(version="HTTP/2.1"), cli.SUCCESS)
        )
        self.assertEqual(
            execute("--response", "--version", "HTTP/2.1"),
            (response(version="HTTP/2.1"), cli.SUCCESS)
        )
Exemple #2
0
    def testSettingMethod(self):

        self.assertEqual(
            execute("--method", "PROPFIND"),
            (request(method="PROPFIND"), cli.SUCCESS)
        )
Exemple #3
0
    def testSettingHeader(self):

        self.assertEqual(
            execute("--request", "-h", "User-agent", "fn"),
            (request(headers=(("User-agent", "fn"), )), cli.SUCCESS)
        )
Exemple #4
0
    def testSettingPath(self):

        self.assertEqual(
            execute("--path", "/login"),
            (request(path="/login"), cli.SUCCESS)
        )