From 61cafa3cb617f89104b5018b97b1825d8c6585a1 Mon Sep 17 00:00:00 2001 From: Mateusz Sikora Date: Thu, 2 Oct 2014 11:23:52 +0200 Subject: [PATCH] fix tests for djnago 1.5 --- rest_auth/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_auth/tests.py b/rest_auth/tests.py index 908c595..ec87188 100644 --- a/rest_auth/tests.py +++ b/rest_auth/tests.py @@ -344,7 +344,7 @@ class APITestCase1(TestCase, BaseAPITestCase): # veirfy email email_confirmation = new_user.emailaddress_set.get(email=self.EMAIL)\ - .emailconfirmation_set.last() + .emailconfirmation_set.order_by('-created')[0] self.post(self.veirfy_email_url, data={"key": email_confirmation.key}, status_code=status.HTTP_200_OK)