Skip to content

Commit

Permalink
test should fail
Browse files Browse the repository at this point in the history
  • Loading branch information
jsocol committed Jan 25, 2021
1 parent 298d4f3 commit ae1f5c5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ratelimit/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,3 +622,10 @@ def test_callable_ip_key(self):
req.META['MY_THING'] = '5.6.7.8'

assert '5.6.7.8' == _get_ip(req)

def test_empty_ip(self):
req = rf.get('/')
req.META['REMOTE_ADDR'] = ''

with self.assertRaises(ImproperlyConfigured):
_get_ip(req)

0 comments on commit ae1f5c5

Please sign in to comment.