From 5551d2e11c0de04e8f1eea83e5507e7dd65fe36f Mon Sep 17 00:00:00 2001 From: Shreyas Mayya <2022smayya@tjhsst.edu> Date: Tue, 2 Nov 2021 10:28:40 -0400 Subject: [PATCH] fix: appease testing suite --- tjdests/apps/authentication/models.py | 2 +- tjdests/apps/destinations/management/commands/import_ceeb.py | 2 +- tjdests/apps/destinations/tests.py | 4 ++-- tjdests/apps/profile/tests.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tjdests/apps/authentication/models.py b/tjdests/apps/authentication/models.py index 19484be..585fa45 100644 --- a/tjdests/apps/authentication/models.py +++ b/tjdests/apps/authentication/models.py @@ -8,7 +8,7 @@ class User(AbstractUser): accepted_terms = models.BooleanField(default=False) graduation_year = models.PositiveSmallIntegerField(null=True) - gpa = models.FloatField(null=True, blank=True, name="GPA", help_text="Weighted GPA") + GPA = models.FloatField(null=True, blank=True, name="GPA", help_text="Weighted GPA") is_senior = models.BooleanField(default=False) is_student = models.BooleanField(default=False) diff --git a/tjdests/apps/destinations/management/commands/import_ceeb.py b/tjdests/apps/destinations/management/commands/import_ceeb.py index 8154ef2..574a93c 100644 --- a/tjdests/apps/destinations/management/commands/import_ceeb.py +++ b/tjdests/apps/destinations/management/commands/import_ceeb.py @@ -17,7 +17,7 @@ class Command(BaseCommand): CEEB, College Name, City, State """ - with open(options["file_name"], "r") as file: + with open(options["file_name"], "r", encoding="utf-8") as file: reader = csv.DictReader(file) for line in reader: diff --git a/tjdests/apps/destinations/tests.py b/tjdests/apps/destinations/tests.py index 030e7f1..f4aaff0 100644 --- a/tjdests/apps/destinations/tests.py +++ b/tjdests/apps/destinations/tests.py @@ -341,7 +341,7 @@ class DestinationsTest(TJDestsTestCase): ) as mock_obj: call_command("import_ceeb", "foo.csv") - mock_obj.assert_called_with("foo.csv", "r") + mock_obj.assert_called_with("foo.csv", "r", encoding="utf-8") self.assertEqual( 1, @@ -381,7 +381,7 @@ class DestinationsTest(TJDestsTestCase): ) as mock_obj: call_command("import_ceeb", "foo.csv") - mock_obj.assert_called_with("foo.csv", "r") + mock_obj.assert_called_with("foo.csv", "r", encoding="utf-8") self.assertEqual( 1, diff --git a/tjdests/apps/profile/tests.py b/tjdests/apps/profile/tests.py index e61034c..60bc257 100644 --- a/tjdests/apps/profile/tests.py +++ b/tjdests/apps/profile/tests.py @@ -103,7 +103,7 @@ class ProfileTest(TJDestsTestCase): 1, User.objects.filter( id=user.id, - GPA=1.234, + GPA=3.141, biography="hello2", attending_decision=decision, publish_data=True,