Skip to content

Commit 2fea98d

Browse files
authored
fix(http2postman) http2postman fails when import statement (#403)
* http2postman with import test case * ignore cert issues * ignore cert issues
1 parent 583b76c commit 2fea98d

7 files changed

Lines changed: 152 additions & 70 deletions

File tree

dotextensions/server/handlers/http2postman.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ def get_collection_item_for_file(self, config, filename, content):
235235

236236
except BaseException:
237237
pass
238-
for index, http in enumerate(http_list.allhttps):
238+
enumerate_list = list(http_list.allhttps)
239+
for index, http in enumerate(enumerate_list):
239240
try:
240241
name = http.namewrap.name if http.namewrap else str(index + 1)
241242
config.target = name

poetry.lock

Lines changed: 53 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "dothttp-req"
3-
version = "0.0.44a26"
3+
version = "0.0.44a27"
44
description = "Dothttp is Simple http client for testing and development"
55
authors = ["Prasanth <kesavarapu.siva@gmail.com>"]
66
license = "MIT"
@@ -21,16 +21,16 @@ dothttp = 'dothttp.__main__:main'
2121

2222

2323
[tool.poetry.dependencies]
24-
python = ">=3.9,<3.14"
24+
python = ">=3.9,<3.15"
2525
jsonschema = "4.23.0"
2626
jstyleson = "0.0.2"
2727
textx = "4.2.3"
28-
requests-pkcs12 = "1.25"
28+
requests-pkcs12 = "1.27"
2929
parsys-requests-unixsocket = "0.3.2"
3030
requests-aws4auth = "1.3.1"
3131
requests-ntlm = "1.3.0"
3232
restrictedpython = "8.1"
33-
faker = "35.2.2"
33+
faker = "37.12.0"
3434
requests-hawk = "1.2.1"
3535
msal = "1.34.0"
3636
pyyaml = "6.0.3"

test/core/test_certs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import sys
3+
import pytest
34
from test import TestBase
45
from unittest import skip
56

@@ -22,6 +23,7 @@ def test_fail_no_property_certificate(self):
2223
comp.get_request()
2324
raise comp.property_util.errors[0]
2425

26+
@pytest.mark.skip("badssl failure, need updates")
2527
def test_certificate_available(self):
2628
filename = f"{http_base}/no-password.http"
2729
cert_file = f"{cert_base}/no-password.pem"
@@ -41,6 +43,7 @@ def test_certificate_available(self):
4143
200, resp_200.status_code, "when cert supplied, it should return 200"
4244
)
4345

46+
@pytest.mark.skip("badssl failure, need updates")
4447
def test_certificate_available2(self):
4548
# insecure is added just to test curl output
4649
filename = f"{http_base}/no-password.http"
@@ -63,6 +66,7 @@ def test_certificate_available2(self):
6366
self.assertTrue(req_comp2.http.certificate, "certificate should be available")
6467
self.assertEqual(200, resp_200.status_code, "with cert, status_code ==200")
6568

69+
@pytest.mark.skip("badssl failure, need updates")
6670
def test_p12(self):
6771
filename = f"{http_base}/no-password.http"
6872
p12 = f"{cert_base}/badssl.com-client.p12"
@@ -75,6 +79,7 @@ def test_p12(self):
7579
self.assertTrue(req_comp2.http.certificate, "certificate should be available")
7680
self.assertEqual(200, resp_200.status_code, "with cert, status_code ==200")
7781

82+
@pytest.mark.skip("badssl failure, need updates")
7883
def test_p12_curl(self):
7984
filename = f"{http_base}/no-password.http"
8085
p12 = f"{cert_base}/badssl.com-client.p12"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import './awsauth.http';
2+
3+
4+
@name('sample') : "simple"
5+
GET '/some'

0 commit comments

Comments
 (0)