Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail with python-ipware 2.0.4 #117

Open
jwhitlock opened this issue Apr 19, 2024 · 2 comments
Open

Tests fail with python-ipware 2.0.4 #117

jwhitlock opened this issue Apr 19, 2024 · 2 comments

Comments

@jwhitlock
Copy link

With python-ipware 2.0.3, 4 tests pass.

With python-ipware 2.0.4, 1 test passes and 3 fail. Our project also had test failures extracting an IP address with 2.0.4.

Found 4 test(s).
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
FFF.
======================================================================
FAIL: test_load (ipware.tests.tests_ip.IpTestCase.test_load)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/john/src/django-ipware/ipware/tests/tests_ip.py", line 20, in test_load
    self.assertEqual(result, ("177.139.233.139", True))
AssertionError: Tuples differ: (None, False) != ('177.139.233.139', True)

First differing element 0:
None
'177.139.233.139'

- (None, False)
+ ('177.139.233.139', True)

======================================================================
FAIL: test_meta_proxy_order_left_most (ipware.tests.tests_ip.IpTestCase.test_meta_proxy_order_left_most)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/john/src/django-ipware/ipware/tests/tests_ip.py", line 28, in test_meta_proxy_order_left_most
    self.assertEqual(result, ("177.139.233.139", True))
AssertionError: Tuples differ: (None, False) != ('177.139.233.139', True)

First differing element 0:
None
'177.139.233.139'

- (None, False)
+ ('177.139.233.139', True)

======================================================================
FAIL: test_meta_proxy_trusted_ips_exact_ip_check (ipware.tests.tests_ip.IpTestCase.test_meta_proxy_trusted_ips_exact_ip_check)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/john/src/django-ipware/ipware/tests/tests_ip.py", line 44, in test_meta_proxy_trusted_ips_exact_ip_check
    self.assertEqual(result, ("177.139.233.139", True))
AssertionError: Tuples differ: (None, False) != ('177.139.233.139', True)

First differing element 0:
None
'177.139.233.139'

- (None, False)
+ ('177.139.233.139', True)

----------------------------------------------------------------------
Ran 4 tests in 0.001s

FAILED (failures=3)
Destroying test database for alias 'default'...
@un33k
Copy link
Owner

un33k commented Apr 19, 2024

Yeah, I have to revert the last changes ... and release a major breaking changes later. Thx for reporting and stay tuned for 2.0.5 soon.

@un33k
Copy link
Owner

un33k commented Apr 19, 2024

We have decided to move forward with the release of major version 7.0.1. All tests are passing. However, since the enforcement of the proxy_count=0 check has been added, along with AI enhancements, there might be minimal backward incompatibility issues in some localized tests, which I encourage users to address. Alternatively, users can pin python-ipware to version 2.0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants