Skip to content

Commit 5c2527c

Browse files
committed
Add tests for validators.py and fix import issue
1 parent 8231ff5 commit 5c2527c

File tree

6 files changed

+576
-11
lines changed

6 files changed

+576
-11
lines changed

pwned/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from django.utils.deconstruct import deconstructible
33
from django.utils.translation import gettext_lazy as _
44

5-
from client import PwnedClient
5+
from .client import PwnedClient
66
from . import app_settings
77

88

tests/cassettes/test_count_occurrences_found.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,17 +254,17 @@ interactions:
254254
headers:
255255
Arr-Disable-Session-Affinity: ['True']
256256
CF-Cache-Status: [HIT]
257-
CF-RAY: [3f44d2724a8b6a07-LHR]
257+
CF-RAY: [3f4cf48f08be3506-LHR]
258258
Cache-Control: ['public, max-age=2678400']
259259
Connection: [keep-alive]
260260
Content-Encoding: [gzip]
261261
Content-Type: [text/plain; charset=utf-8]
262-
Date: ['Wed, 28 Feb 2018 16:39:49 GMT']
262+
Date: ['Thu, 01 Mar 2018 16:21:12 GMT']
263263
Expect-CT: ['max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"']
264-
Expires: ['Sat, 31 Mar 2018 16:39:49 GMT']
264+
Expires: ['Sun, 01 Apr 2018 16:21:12 GMT']
265265
Server: [cloudflare]
266-
Set-Cookie: ['__cfduid=dbb89578ac97b79d5c45ff243e086b6731519835988; expires=Thu,
267-
28-Feb-19 16:39:48 GMT; path=/; domain=.pwnedpasswords.com; HttpOnly; Secure']
266+
Set-Cookie: ['__cfduid=dac9a0a123d9be7f51f7319b06df156091519921272; expires=Fri,
267+
01-Mar-19 16:21:12 GMT; path=/; domain=.pwnedpasswords.com; HttpOnly; Secure']
268268
Strict-Transport-Security: [max-age=31536000; includeSubDomains; preload]
269269
Vary: [Accept-Encoding]
270270
X-Content-Type-Options: [nosniff]

tests/cassettes/test_count_occurrences_none.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ interactions:
55
Accept: ['*/*']
66
Accept-Encoding: ['gzip, deflate']
77
Connection: [keep-alive]
8-
Cookie: [__cfduid=dbb89578ac97b79d5c45ff243e086b6731519835988]
8+
Cookie: [__cfduid=dac9a0a123d9be7f51f7319b06df156091519921272]
99
User-Agent: [github.com/craigloftus/django-pwned-validator]
1010
method: GET
1111
uri: https://api.pwnedpasswords.com/range/EE97D
@@ -257,15 +257,15 @@ interactions:
257257
9v4f81t/qb1HAAA=
258258
headers:
259259
Arr-Disable-Session-Affinity: ['True']
260-
CF-Cache-Status: [MISS]
261-
CF-RAY: [3f44d6ee4c9b3470-LHR]
260+
CF-Cache-Status: [HIT]
261+
CF-RAY: [3f4cf4903ab06a67-LHR]
262262
Cache-Control: ['public, max-age=2678400']
263263
Connection: [keep-alive]
264264
Content-Encoding: [gzip]
265265
Content-Type: [text/plain; charset=utf-8]
266-
Date: ['Wed, 28 Feb 2018 16:42:53 GMT']
266+
Date: ['Thu, 01 Mar 2018 16:21:12 GMT']
267267
Expect-CT: ['max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"']
268-
Expires: ['Sat, 31 Mar 2018 16:42:53 GMT']
268+
Expires: ['Sun, 01 Apr 2018 16:21:12 GMT']
269269
Server: [cloudflare]
270270
Strict-Transport-Security: [max-age=31536000; includeSubDomains; preload]
271271
Vary: [Accept-Encoding]

0 commit comments

Comments
 (0)