Skip to content

Commit

Permalink
httpx: cleanup None entries in Client mounts before asserting the size
Browse files Browse the repository at this point in the history
  • Loading branch information
xrmx committed Aug 25, 2024
1 parent bc4d2c5 commit 17f1090
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -755,8 +755,9 @@ def create_proxy_mounts(self):
}

def assert_proxy_mounts(self, mounts, num_mounts, transport_type):
self.assertEqual(len(mounts), num_mounts)
for transport in mounts:
valid_mounts = [mount for mount in mounts if mount is not None]
self.assertEqual(len(valid_mounts), num_mounts)
for transport in valid_mounts:
with self.subTest(transport):
self.assertIsInstance(
transport,
Expand Down

0 comments on commit 17f1090

Please sign in to comment.