codeforlife-portal 8.0.3__py2.py3-none-any.whl → 8.0.5__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of codeforlife-portal might be problematic. Click here for more details.

cfl_common/setup.py CHANGED
@@ -17,13 +17,13 @@ setup(
17
17
  version=version,
18
18
  include_package_data=True,
19
19
  install_requires=[
20
- "django==4.2.16",
20
+ "django==4.2.17",
21
21
  "django-countries==7.6.1",
22
22
  "django-csp==3.8",
23
23
  "django-import-export==4.2.0",
24
24
  "django-pipeline==3.1.0",
25
25
  "django-two-factor-auth==1.17.0",
26
- "djangorestframework==3.15.1",
26
+ "djangorestframework==3.15.2",
27
27
  "libsass==0.23.0",
28
28
  "more-itertools==8.7.0",
29
29
  "pgeocode==0.4.0",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: codeforlife-portal
3
- Version: 8.0.3
3
+ Version: 8.0.5
4
4
  Classifier: Programming Language :: Python
5
5
  Classifier: Programming Language :: Python :: 3.12
6
6
  Classifier: Framework :: Django
@@ -1,5 +1,5 @@
1
1
  cfl_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- cfl_common/setup.py,sha256=XLMyrOLiz1PqXQbnMUcYZEmT5dscDfDjlYF_8r7UmxI,978
2
+ cfl_common/setup.py,sha256=0Bbnt2gvlq6PnI5wMZ3hPuccY-CtdKQIy5RSSmbja4U,978
3
3
  cfl_common/common/__init__.py,sha256=XlncBOpKp_gekbKH7Y_i6yu1qy5tJc3Y8sn8cDy-Vgk,48
4
4
  cfl_common/common/app_settings.py,sha256=Bw1DXkZpNIdwUJ-cIOjZnngH5_NbMXC0koW7NgQ0pKY,2495
5
5
  cfl_common/common/apps.py,sha256=49UXZ3bSkFKvIEOL4zM7y1sAhccQJyRtsoOg5XVd_8Y,129
@@ -108,7 +108,7 @@ example_project/portal_test_settings.py,sha256=7Q7SdosA0Ba85qz-xkAe3EHyMPpSIQ61C
108
108
  example_project/settings.py,sha256=NjFhtDNLwdY5vhUAtqk9a9m3GRfcuWRVqIqnJ3u0o6E,5658
109
109
  example_project/urls.py,sha256=FUTzHPlUS1O5kqMHjL5V4L552N2ln7uTDXcw9wjKUto,422
110
110
  example_project/wsgi.py,sha256=U1W6WzZxZaIdYZ5tks7w9fqp5WS5qvn2iThsVcskrWw,829
111
- portal/__init__.py,sha256=GImAlzwPDxsACkYFf5rTrX8QMH23tcqdm6vgjfFYD10,22
111
+ portal/__init__.py,sha256=obOXkQD52zgzH-mM2spS6LQ-gEWkuaiGpNTM_ISH0D8,22
112
112
  portal/admin.py,sha256=RKJizTF6dPJKmGPZw7nZUM0X8jkiTjgyKhLQxtvHJ0I,6148
113
113
  portal/app_settings.py,sha256=DhWLQOwM0zVOXE3O5TNKbMM9K6agfLuCsHOdr1J7xEI,651
114
114
  portal/backends.py,sha256=2Dss6_WoQwPuDzJUF1yEaTQTNG4eUrD12ujJQ5cp5Tc,812
@@ -548,7 +548,7 @@ portal/tests/test_school_student.py,sha256=bFZwY4twaFHQLp0cltMq8cLNDZGgCHTZBCZHK
548
548
  portal/tests/test_security.py,sha256=FGrlRfnzi-Xx2_bn4fTZlYORKm7w_GhGkD3havvplwc,3239
549
549
  portal/tests/test_teacher.py,sha256=vjnJi_aj_x48OJOMMRIBr0JTCxy4tFxqrLfCgw0fRxQ,29315
550
550
  portal/tests/test_teacher_student.py,sha256=NWITbUw1kijqu3c8eRHLHJKaYQMOsOMvl7PAVx5QghI,21567
551
- portal/tests/test_views.py,sha256=fBh8fZkS4p9iMEqeMgSSAcL09nH6TCohwdX4BuysxjQ,47389
551
+ portal/tests/test_views.py,sha256=hkOxKC7oMoIsjiwVPX_HSwd2WmAQBjNbaxsz1d6FS4Y,47422
552
552
  portal/tests/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
553
553
  portal/tests/migrations/test_migration_make_portaladmin_teacher.py,sha256=ekMRb6cU97oT0k9gCKW7IUB7oPuGmv4uWJCqInQN7x8,2589
554
554
  portal/tests/migrations/test_migration_preview_user_remove.py,sha256=K6D-FZT9YFEA8oMxHz9VTglVV6MZOTRYVlvwWwXc2vU,555
@@ -631,8 +631,8 @@ portal/views/two_factor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
631
631
  portal/views/two_factor/core.py,sha256=Lk32z2SN2Pg0rRkK-N-LXMvXC1kKKsH3l692kiSDQ4E,964
632
632
  portal/views/two_factor/form.py,sha256=lnHNKI-BMlpncTuW3zUzjPaJJNuEra2I_nOam0eOKFY,257
633
633
  portal/views/two_factor/profile.py,sha256=SHSg_xHccE5PtD-OfuOkYhREYz_er4bj5ro1RjJ88Yw,393
634
- codeforlife_portal-8.0.3.dist-info/LICENSE.md,sha256=9AbRlCDqD2D1tPibimysFv3zg3AIc49-eyv9aEsyq9w,115
635
- codeforlife_portal-8.0.3.dist-info/METADATA,sha256=xastgmJa810ijhKg2U5emDoMG0_Jfk5WsNVPtYCvZ_k,3078
636
- codeforlife_portal-8.0.3.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
637
- codeforlife_portal-8.0.3.dist-info/top_level.txt,sha256=8e5pdsuIoTqEAMqpelHBjGjLbffcBtgOoggmd2q7nMw,41
638
- codeforlife_portal-8.0.3.dist-info/RECORD,,
634
+ codeforlife_portal-8.0.5.dist-info/LICENSE.md,sha256=9AbRlCDqD2D1tPibimysFv3zg3AIc49-eyv9aEsyq9w,115
635
+ codeforlife_portal-8.0.5.dist-info/METADATA,sha256=bKibW2WrX0tXBDAv7udANvAKqHi_loOgnbrA09XRh8w,3078
636
+ codeforlife_portal-8.0.5.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
637
+ codeforlife_portal-8.0.5.dist-info/top_level.txt,sha256=8e5pdsuIoTqEAMqpelHBjGjLbffcBtgOoggmd2q7nMw,41
638
+ codeforlife_portal-8.0.5.dist-info/RECORD,,
portal/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "8.0.3"
1
+ __version__ = "8.0.5"
@@ -4,8 +4,8 @@ import json
4
4
  from datetime import date, datetime, timedelta
5
5
  from unittest.mock import ANY, Mock, patch
6
6
 
7
- import PyPDF2
8
7
  import pytest
8
+ from common.mail import campaign_ids
9
9
  from common.models import (
10
10
  Class,
11
11
  DailyActivity,
@@ -16,7 +16,6 @@ from common.models import (
16
16
  UserProfile,
17
17
  UserSession,
18
18
  )
19
- from common.mail import campaign_ids
20
19
  from common.tests.utils.classes import create_class_directly
21
20
  from common.tests.utils.organisation import (
22
21
  create_organisation_directly,
@@ -35,6 +34,7 @@ from django.utils import timezone
35
34
  from game.models import Level
36
35
  from game.tests.utils.attempt import create_attempt
37
36
  from game.tests.utils.level import create_save_level
37
+ from pypdf import PdfReader
38
38
  from rest_framework.test import APIClient, APITestCase
39
39
 
40
40
  from deploy import captcha
@@ -93,10 +93,10 @@ class TestTeacherViews(TestCase):
93
93
 
94
94
  # read PDF, check there's only 1 page and that the correct student details show
95
95
  with io.BytesIO(response.content) as pdf_file:
96
- file_reader = PyPDF2.PdfFileReader(pdf_file)
97
- assert file_reader.getNumPages() == 1
96
+ file_reader = PdfReader(pdf_file)
97
+ assert len(file_reader.pages) == 1
98
98
 
99
- page_text = file_reader.getPage(0).extractText()
99
+ page_text = file_reader.pages[0].extract_text()
100
100
  assert NAME1 in page_text
101
101
  assert NAME2 in page_text
102
102
  assert PASSWORD1 in page_text
@@ -119,11 +119,11 @@ class TestTeacherViews(TestCase):
119
119
 
120
120
  # Check there are 2 pages and that each page contains the warning text
121
121
  with io.BytesIO(response.content) as pdf_file:
122
- file_reader = PyPDF2.PdfFileReader(pdf_file)
123
- assert file_reader.getNumPages() == 2
122
+ file_reader = PdfReader(pdf_file)
123
+ assert len(file_reader.pages) == 2
124
124
 
125
- page1_text = file_reader.getPage(0).extractText()
126
- page2_text = file_reader.getPage(1).extractText()
125
+ page1_text = file_reader.pages[0].extract_text()
126
+ page2_text = file_reader.pages[1].extract_text()
127
127
  assert REMINDER_CARDS_PDF_WARNING_TEXT in page1_text
128
128
  assert REMINDER_CARDS_PDF_WARNING_TEXT in page2_text
129
129
 
@@ -252,20 +252,24 @@ class TestTeacherViews(TestCase):
252
252
  assert response.status_code == 302
253
253
 
254
254
  student = Student.objects.get(pk=self.student.pk)
255
-
255
+
256
256
  assert student.user.is_verified
257
257
 
258
258
  c.logout()
259
259
  c.login(username=self.email, password=self.password)
260
260
 
261
- teacher = Teacher.objects.factory("the", "teacher", "theteacher@foo.com", "password")
261
+ teacher = Teacher.objects.factory(
262
+ "the", "teacher", "theteacher@foo.com", "password"
263
+ )
262
264
  level = Level.objects.create()
263
-
265
+
264
266
  level.owner = student.new_user.userprofile
265
267
  level.shared_with.add(teacher.new_user)
266
268
  level.save()
267
269
 
268
- students_levels = Level.objects.filter(owner=student.new_user.userprofile).all()
270
+ students_levels = Level.objects.filter(
271
+ owner=student.new_user.userprofile
272
+ ).all()
269
273
 
270
274
  for level in students_levels.all():
271
275
  assert level.shared_with.exists()
@@ -292,7 +296,9 @@ class TestTeacherViews(TestCase):
292
296
  student = Student.objects.get(pk=self.student.pk)
293
297
  assert not student.user.is_verified
294
298
 
295
- students_levels = Level.objects.filter(owner=student.new_user.userprofile).all()
299
+ students_levels = Level.objects.filter(
300
+ owner=student.new_user.userprofile
301
+ ).all()
296
302
 
297
303
  for level in students_levels.all():
298
304
  assert not level.shared_with.exists()