From 6e2ea2b94aba3c533e61555066580d62d229eb48 Mon Sep 17 00:00:00 2001 From: Ken Cochrane Date: Thu, 22 Oct 2015 13:37:41 -0400 Subject: [PATCH] fix compatibility issues with python 2.6, and disable testing on django versions 1.6.x and 1.7.x on python 3.5 --- .travis.yml | 4 ++++ defender/tests.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ecb4a57..9d7b8ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,6 +36,10 @@ matrix: env: DJANGO=Django==1.8.5 - python: "2.6" env: DJANGO=Django==1.9b1 + - python: "3.5" + env: DJANGO=Django==1.6.11 + - python: "3.5" + env: DJANGO=Django==1.7.10 after_success: - coveralls --verbose diff --git a/defender/tests.py b/defender/tests.py index d362359..9699dbb 100644 --- a/defender/tests.py +++ b/defender/tests.py @@ -615,7 +615,7 @@ class AccessAttemptTest(DefenderTestCase): # same IP different, usernames ip = '74.125.239.60' for i in range(0, config.FAILURE_LIMIT+10): - login_username = u"{}{}".format(username, i) + login_username = u"{0}{1}".format(username, i) response = self._login(username=login_username, remote_addr=ip) # Check if we are in the same login page self.assertContains(response, LOGIN_FORM_KEY)