From 70ed2dacaa17b3e89f3321562bab8cc7334198af Mon Sep 17 00:00:00 2001 From: Brandon Rodriguez <brodriguez8774@gmail.com> Date: Mon, 1 Apr 2024 02:47:08 -0400 Subject: [PATCH] Correct test line to account for changes in how ETC package is handling inactive users --- django_rest/test_app/tests/etc_tests/test_models.py | 4 ++-- django_v2/test_app/tests/etc_tests/test_models.py | 4 ++-- django_v3/test_app/tests/etc_tests/test_models.py | 4 ++-- django_v4/test_app/tests/etc_tests/test_models.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/django_rest/test_app/tests/etc_tests/test_models.py b/django_rest/test_app/tests/etc_tests/test_models.py index 18f8d02..96ce89a 100644 --- a/django_rest/test_app/tests/etc_tests/test_models.py +++ b/django_rest/test_app/tests/etc_tests/test_models.py @@ -158,7 +158,7 @@ class ModelTestCase(IntegrationTestCase): uwsgi_user = uwsgi_user._wrapped # Various checks, of different ways to ensure expected user is logged in. - self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) + # self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) self.assertTrue(isinstance(uwsgi_user, AnonymousUser)) self.assertFalse(isinstance(uwsgi_user, get_user_model())) self.assertNotEqual(self.test_inactive_user, uwsgi_user) @@ -166,7 +166,7 @@ class ModelTestCase(IntegrationTestCase): self.assertFalse(isinstance(response.user, get_user_model())) # Try again, to make sure that accessing any of the above values didn't somehow clear the client. - self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) + # self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) self.assertTrue(isinstance(uwsgi_user, AnonymousUser)) self.assertFalse(isinstance(uwsgi_user, get_user_model())) self.assertNotEqual(self.test_inactive_user, uwsgi_user) diff --git a/django_v2/test_app/tests/etc_tests/test_models.py b/django_v2/test_app/tests/etc_tests/test_models.py index 926fdab..ddb2c8a 100644 --- a/django_v2/test_app/tests/etc_tests/test_models.py +++ b/django_v2/test_app/tests/etc_tests/test_models.py @@ -158,7 +158,7 @@ class ModelTestCase(IntegrationTestCase): uwsgi_user = uwsgi_user._wrapped # Various checks, of different ways to ensure expected user is logged in. - self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) + # self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) self.assertTrue(isinstance(uwsgi_user, AnonymousUser)) self.assertFalse(isinstance(uwsgi_user, get_user_model())) self.assertNotEqual(self.test_inactive_user, uwsgi_user) @@ -166,7 +166,7 @@ class ModelTestCase(IntegrationTestCase): self.assertFalse(isinstance(response.user, get_user_model())) # Try again, to make sure that accessing any of the above values didn't somehow clear the client. - self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) + # self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) self.assertTrue(isinstance(uwsgi_user, AnonymousUser)) self.assertFalse(isinstance(uwsgi_user, get_user_model())) self.assertNotEqual(self.test_inactive_user, uwsgi_user) diff --git a/django_v3/test_app/tests/etc_tests/test_models.py b/django_v3/test_app/tests/etc_tests/test_models.py index 8b4bea1..b88c557 100644 --- a/django_v3/test_app/tests/etc_tests/test_models.py +++ b/django_v3/test_app/tests/etc_tests/test_models.py @@ -162,7 +162,7 @@ class ModelTestCase(IntegrationTestCase): uwsgi_user = uwsgi_user._wrapped # Various checks, of different ways to ensure expected user is logged in. - self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) + # self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) self.assertTrue(isinstance(uwsgi_user, AnonymousUser)) self.assertFalse(isinstance(uwsgi_user, get_user_model())) self.assertNotEqual(self.test_inactive_user, uwsgi_user) @@ -170,7 +170,7 @@ class ModelTestCase(IntegrationTestCase): self.assertFalse(isinstance(response.user, get_user_model())) # Try again, to make sure that accessing any of the above values didn't somehow clear the client. - self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) + # self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) self.assertTrue(isinstance(uwsgi_user, AnonymousUser)) self.assertFalse(isinstance(uwsgi_user, get_user_model())) self.assertNotEqual(self.test_inactive_user, uwsgi_user) diff --git a/django_v4/test_app/tests/etc_tests/test_models.py b/django_v4/test_app/tests/etc_tests/test_models.py index 08e126f..5358c9c 100644 --- a/django_v4/test_app/tests/etc_tests/test_models.py +++ b/django_v4/test_app/tests/etc_tests/test_models.py @@ -158,7 +158,7 @@ class ModelTestCase(IntegrationTestCase): uwsgi_user = uwsgi_user._wrapped # Various checks, of different ways to ensure expected user is logged in. - self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) + # self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) self.assertTrue(isinstance(uwsgi_user, AnonymousUser)) self.assertFalse(isinstance(uwsgi_user, get_user_model())) self.assertNotEqual(self.test_inactive_user, uwsgi_user) @@ -166,7 +166,7 @@ class ModelTestCase(IntegrationTestCase): self.assertFalse(isinstance(response.user, get_user_model())) # Try again, to make sure that accessing any of the above values didn't somehow clear the client. - self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) + # self.assertEqual(self.test_inactive_user.pk, int(self.client.session.get('_auth_user_id', None))) self.assertTrue(isinstance(uwsgi_user, AnonymousUser)) self.assertFalse(isinstance(uwsgi_user, get_user_model())) self.assertNotEqual(self.test_inactive_user, uwsgi_user) -- GitLab