Skip to content

Commit 1744736

Browse files
committed
Merged in [14850] from rjsparks@nostrum.com:
Improvements to test coverage in ietf.meeting.views - Legacy-Id: 14866 Note: SVN reference [14850] has been migrated to Git commit 02d975a
3 parents 1ece5f1 + 02d975a + f0a4ff2 commit 1744736

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

PLAN

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ Planned work in rough order
1212
* Introduce an API for Meetecho to use to associate recordings with sessions
1313
(and perhaps automate making copies of those videos)
1414

15+
* GDPR related: a) Add SimpleHistory for Person in order to have traceability
16+
of changes to person records. Include client IP address. b) Make sure all
17+
parts of a person's record is reflected on the account page and can be
18+
updated/corrected. c) Any form update requires a checkbox filled in which
19+
signifies consent to use the data on the IETF website. d) The submission
20+
tool also requires a consent checkbox for usage of personal data contained
21+
in the uploaded draft. e) There should be a link (in the footer?) to a page
22+
common for the IETF, probably, that describes how to request purging your
23+
personal information from the datatracker. Actual purging can be done trough
24+
the Django admin interface, no new software required.
25+
1526
* Reworked UI and refactored backend for the scretariat meeting scheduling
1627
tool.
1728

ietf/meeting/tests_views.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
from ietf.meeting.factories import ( SessionFactory, SessionPresentationFactory, ScheduleFactory,
3838
MeetingFactory, FloorPlanFactory, TimeSlotFactory )
3939
from ietf.doc.factories import DocumentFactory
40+
from ietf.submit.tests import submission_file
4041

4142

4243
class MeetingTests(TestCase):
@@ -462,6 +463,35 @@ def test_group_ical(self):
462463
self.assertNotContains(r, t2.time.strftime('%Y%m%dT%H%M%S'))
463464
self.assertContains(r, 'END:VEVENT')
464465

466+
def test_session_draft_tarfile(self):
467+
session = SessionFactory(group__type_id='wg',meeting__type_id='ietf')
468+
doc = DocumentFactory(type_id='draft')
469+
session.sessionpresentation_set.create(document=doc)
470+
file,_ = submission_file(name=doc.name,format='txt',templatename='test_submission.txt',group=session.group,rev="00")
471+
filename = os.path.join(doc.get_file_path(),file.name)
472+
with open(filename,'w') as draftbits:
473+
draftbits.write(file.getvalue())
474+
475+
url = urlreverse('ietf.meeting.views.session_draft_tarfile', kwargs={'num':session.meeting.number,'acronym':session.group.acronym})
476+
response = self.client.get(url)
477+
self.assertEqual(response.status_code, 200)
478+
self.assertEqual(response.get('Content-Type'), 'application/octet-stream')
479+
os.unlink(filename)
480+
481+
def test_session_draft_pdf(self):
482+
session = SessionFactory(group__type_id='wg',meeting__type_id='ietf')
483+
doc = DocumentFactory(type_id='draft')
484+
session.sessionpresentation_set.create(document=doc)
485+
file,_ = submission_file(name=doc.name,format='txt',templatename='test_submission.txt',group=session.group,rev="00")
486+
filename = os.path.join(doc.get_file_path(),file.name)
487+
with open(filename,'w') as draftbits:
488+
draftbits.write(file.getvalue())
489+
490+
url = urlreverse('ietf.meeting.views.session_draft_pdf', kwargs={'num':session.meeting.number,'acronym':session.group.acronym})
491+
response = self.client.get(url)
492+
self.assertEqual(response.status_code, 200)
493+
self.assertEqual(response.get('Content-Type'), 'application/pdf')
494+
os.unlink(filename)
465495

466496

467497
class EditTests(TestCase):

0 commit comments

Comments
 (0)