From 2837999a5b586dc69f5e83c9639916427f26829b Mon Sep 17 00:00:00 2001 From: reverend Date: Thu, 3 Sep 2020 20:11:02 +0200 Subject: [PATCH] Bufix, i guess --- lostplaces/lostplaces_app/tests/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lostplaces/lostplaces_app/tests/__init__.py b/lostplaces/lostplaces_app/tests/__init__.py index 4d80975..498b38b 100644 --- a/lostplaces/lostplaces_app/tests/__init__.py +++ b/lostplaces/lostplaces_app/tests/__init__.py @@ -1,6 +1,7 @@ -from django.db import models +from django.db import models as django_models from lostplaces_app.models import Explorer + def mock_user(): explorer_list = Explorer.objects.all() if len(explorer_list) <= 0: @@ -17,14 +18,14 @@ class TestSubmittable: def test_submitted_when(self): submitted_when = self.object._meta.get_field('submitted_when') self.assertTrue(submitted_when) - self.assertEqual(type(submitted_when), models.DateTimeField) + self.assertEqual(type(submitted_when), django_models.DateTimeField) self.assertTrue(submitted_when.auto_now_add) def test_submitted_by(self): submitted_by = self.object._meta.get_field('submitted_by') self.assertTrue(submitted_by) - self.assertEqual(type(submitted_by), models.ForeignKey) + self.assertEqual(type(submitted_by), django_models.ForeignKey) self.assertEqual(submitted_by.remote_field.related_name, 'places') self.assertTrue(submitted_by.null) self.assertTrue(submitted_by.blank) - self.assertEqual(submitted_by.remote_field.on_delete, models.SET_NULL) \ No newline at end of file + self.assertEqual(submitted_by.remote_field.on_delete, django_models.SET_NULL) \ No newline at end of file