Merged in trunk@9440, containing the changes for version 5.13.1; and updated tests which look at HTML content to work with the facelift changes.
- Legacy-Id: 9446
This commit is contained in:
commit
02cd366ff0
42
changelog
42
changelog
|
@ -1,3 +1,45 @@
|
|||
ietfdb (5.13.1) ietf; urgency=medium
|
||||
|
||||
This is a bugfix release, to have a clean slate before merging in the
|
||||
Bootstrap facelift for 6.0.0. Details:
|
||||
|
||||
* Merged in [9428] from rjsparks@nostrum.com:
|
||||
Properly mark (and test) older ballot comment and discuss text after a new
|
||||
revision is submitted. Fixes bug #1656.
|
||||
|
||||
* Merged in [9426] from rcross@amsl.com:
|
||||
Add several 'From' options for IAD user of announcement tool.
|
||||
|
||||
* Merged in [9375] from rjsparks@nostrum.com:
|
||||
Put old style slides directly into archived. Migrate IETF92 materials to
|
||||
match.
|
||||
|
||||
* Merged in [9351] from rjsparks@nostrum.com:
|
||||
Removed sessonly, replacing the idea with a separate State. Add tests
|
||||
checking how materials show on agenda views.
|
||||
|
||||
* Fixed style attributes which resulted in red text on red background for
|
||||
some error messages
|
||||
|
||||
* Buildbot changes: Separated out the schedulers for trunk, personal/* and
|
||||
branch/*. Corrected regex patterns which extract unittest details. Added
|
||||
a first tentative email notifier. Added ForceSchedulers, in order to be
|
||||
able to force builds.
|
||||
|
||||
* Changed all explicitly set HttpResponse content_types to specify charset.
|
||||
Django sets charset if you don't specify a content_type; if you specify
|
||||
one you also must add a charset specification (if you want one). Fixes
|
||||
issue #1647.
|
||||
|
||||
* Fixed a typo in the sort key generation for the sort on ipr count in
|
||||
document search results.
|
||||
|
||||
* Updated release data and mkrelease support, which calculates the
|
||||
release coverage snapshot without invoking tests that developers won't
|
||||
ordinarily be able to run on their laptops/work machines.
|
||||
|
||||
-- Henrik Levkowetz <henrik@levkowetz.com> 10 Apr 2015 13:44:05 +0000
|
||||
|
||||
ietfdb (5.13.0) ietf; urgency=medium
|
||||
|
||||
**IETF 92 Code Sprint**
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright The IETF Trust 2007, All Rights Reserved
|
||||
|
||||
__version__ = "5.13.1.dev1"
|
||||
__version__ = "5.13.2.dev0"
|
||||
|
||||
__date__ = "$Date$"
|
||||
|
||||
__rev__ = "$Rev$ (dev) Latest release: Rev. 9335 "
|
||||
__rev__ = "$Rev$ (dev) Latest release: Rev. 9438 "
|
||||
|
||||
__id__ = "$Id$"
|
||||
|
|
50
ietf/doc/migrations/0003_auto_20150326_0728.py
Normal file
50
ietf/doc/migrations/0003_auto_20150326_0728.py
Normal file
|
@ -0,0 +1,50 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
def forward_materials_state(apps, schema_editor):
|
||||
StateType = apps.get_model('doc', 'StateType')
|
||||
State = apps.get_model('doc', 'State')
|
||||
|
||||
StateType.objects.create(slug='reuse_policy',label='Policy')
|
||||
|
||||
single = State.objects.create(type_id='reuse_policy',slug='single',name='Single Meeting')
|
||||
multiple = State.objects.create(type_id='reuse_policy',slug='multiple',name='Multiple Meetings')
|
||||
|
||||
Document = apps.get_model('doc', 'Document')
|
||||
for doc in Document.objects.filter(type='slides'):
|
||||
if doc.group.type.slug=='team':
|
||||
doc.states.add(multiple)
|
||||
else:
|
||||
doc.states.add(single)
|
||||
|
||||
# Expected to be a no-op on current database, but just for completeness
|
||||
for doc in Document.objects.filter(type='slides'):
|
||||
doc.states.filter(type='slides',slug='sessonly').update(slug='active')
|
||||
|
||||
State.objects.filter(type_id='slides',slug='sessonly').delete()
|
||||
|
||||
|
||||
def reverse_materials_state(apps, schema_editor):
|
||||
Document = apps.get_model('doc', 'Document')
|
||||
for doc in Document.objects.filter(type='slides'):
|
||||
doc.states.filter(type='update_policy').delete()
|
||||
|
||||
StateType = apps.get_model('doc', 'StateType')
|
||||
StateType.objects.filter(slug='update_policy').delete()
|
||||
|
||||
State = apps.get_model('doc', 'State')
|
||||
State.objects.create(type='slides',slug='sessonly',name='Session Only')
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('doc', '0002_auto_20141222_1749'),
|
||||
('group', '0003_auto_20150304_0743'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(forward_materials_state,reverse_materials_state),
|
||||
]
|
37
ietf/doc/migrations/0004_auto_20150403_1235.py
Normal file
37
ietf/doc/migrations/0004_auto_20150403_1235.py
Normal file
|
@ -0,0 +1,37 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
def set_state(doc, state):
|
||||
already_set = doc.states.filter(type=state.type)
|
||||
others = [s for s in already_set if s != state]
|
||||
if others:
|
||||
doc.states.remove(*others)
|
||||
if state not in already_set:
|
||||
doc.states.add(state)
|
||||
doc.state_cache = None
|
||||
|
||||
def forward_archive_slides(apps,schema_editor):
|
||||
Document = apps.get_model('doc', 'Document')
|
||||
State = apps.get_model('doc','State')
|
||||
archived = State.objects.get(type__slug='slides',slug='archived')
|
||||
for doc in Document.objects.filter(name__startswith='slides-92-',states__type__slug='slides',states__slug='active'):
|
||||
set_state(doc,archived)
|
||||
|
||||
def reverse_archive_slides(apps,schema_editor):
|
||||
Document = apps.get_model('doc', 'Document')
|
||||
State = apps.get_model('doc','State')
|
||||
active = State.objects.get(type__slug='slides',slug='active')
|
||||
for doc in Document.objects.filter(name__startswith='slides-92-',states__type__slug='slides',states__slug='archived'):
|
||||
set_state(doc,active)
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('doc', '0003_auto_20150326_0728'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(forward_archive_slides,reverse_archive_slides),
|
||||
]
|
|
@ -233,14 +233,13 @@ class DocumentInfo(models.Model):
|
|||
return None
|
||||
|
||||
def meeting_related(self):
|
||||
if self.type_id in ("agenda","minutes","bluesheets"):
|
||||
return (self.name.split("-")[1] == "interim"
|
||||
or (self.session_set.exists() if isinstance(self, Document) else self.doc.session_set.exists()))
|
||||
elif self.type_id in ("slides",):
|
||||
return (self.name.split("-")[1] == "interim"
|
||||
or (self.get_state('slides') and self.get_state('slides').slug in ("active", "sessonly","archived") ))
|
||||
else:
|
||||
return False
|
||||
answer = False
|
||||
if self.type_id in ("agenda","minutes","bluesheets","slides"):
|
||||
answer = (self.name.split("-")[1] == "interim"
|
||||
or (self if isinstance(self, Document) else self.doc).session_set.exists())
|
||||
if self.type_id in ("slides",):
|
||||
answer = answer and self.get_state_slug('reuse_policy')=='single'
|
||||
return answer
|
||||
|
||||
def relations_that(self, relationship):
|
||||
"""Return the related-document objects that describe a given relationship targeting self."""
|
||||
|
@ -702,7 +701,7 @@ class DocEvent(models.Model):
|
|||
desc = models.TextField()
|
||||
|
||||
def for_current_revision(self):
|
||||
return self.time >= self.doc.time
|
||||
return self.time >= self.doc.latest_event(NewRevisionDocEvent,type='new_revision').time
|
||||
|
||||
def get_dochistory(self):
|
||||
return DocHistory.objects.filter(time__lte=self.time,doc__name=self.doc.name).order_by('-time').first()
|
||||
|
|
|
@ -14,8 +14,11 @@ from Cookie import SimpleCookie
|
|||
from django.core.urlresolvers import reverse as urlreverse
|
||||
from django.conf import settings
|
||||
|
||||
import debug # pyflakes:ignore
|
||||
|
||||
from ietf.doc.models import ( Document, DocAlias, DocRelationshipName, RelatedDocument, State,
|
||||
DocEvent, BallotPositionDocEvent, LastCallDocEvent, WriteupDocEvent, save_document_in_history )
|
||||
DocEvent, BallotPositionDocEvent, LastCallDocEvent, WriteupDocEvent, NewRevisionDocEvent,
|
||||
save_document_in_history )
|
||||
from ietf.group.models import Group
|
||||
from ietf.meeting.models import Meeting, Session, SessionPresentation
|
||||
from ietf.name.models import SessionStatusName
|
||||
|
@ -534,6 +537,8 @@ class DocTestCase(TestCase):
|
|||
doc = make_test_data()
|
||||
ballot = doc.active_ballot()
|
||||
|
||||
save_document_in_history(doc)
|
||||
|
||||
pos = BallotPositionDocEvent.objects.create(
|
||||
doc=doc,
|
||||
ballot=ballot,
|
||||
|
@ -556,6 +561,16 @@ class DocTestCase(TestCase):
|
|||
# test popup too while we're at it
|
||||
r = self.client.get(urlreverse("ietf.doc.views_doc.ballot_popup", kwargs=dict(name=doc.name, ballot_id=ballot.pk)))
|
||||
self.assertEqual(r.status_code, 200)
|
||||
|
||||
# Now simulate a new revision and make sure positions on older revisions are marked as such
|
||||
oldrev = doc.rev
|
||||
e = NewRevisionDocEvent.objects.create(doc=doc,rev='%02d'%(int(doc.rev)+1),type='new_revision',by=Person.objects.get(name="(System)"))
|
||||
save_document_in_history(doc)
|
||||
doc.rev = e.rev
|
||||
doc.save()
|
||||
r = self.client.get(urlreverse("ietf.doc.views_doc.document_ballot", kwargs=dict(name=doc.name)))
|
||||
self.assertEqual(r.status_code, 200)
|
||||
self.assertTrue( '(%s for -%s)' % (pos.comment_time.strftime('%Y-%m-%d'), oldrev) in r.content)
|
||||
|
||||
def test_document_ballot_needed_positions(self):
|
||||
make_test_data()
|
||||
|
|
|
@ -43,6 +43,7 @@ class GroupMaterialTests(TestCase):
|
|||
|
||||
doc = Document.objects.create(name="slides-testteam-test-file", rev="01", type_id="slides", group=group)
|
||||
doc.set_state(State.objects.get(type="slides", slug="active"))
|
||||
doc.set_state(State.objects.get(type="reuse_policy", slug="multiple"))
|
||||
DocAlias.objects.create(name=doc.name, document=doc)
|
||||
NewRevisionDocEvent.objects.create(doc=doc,by=Person.objects.get(name="(System)"),rev='00',type='new_revision',desc='New revision available')
|
||||
NewRevisionDocEvent.objects.create(doc=doc,by=Person.objects.get(name="(System)"),rev='01',type='new_revision',desc='New revision available')
|
||||
|
@ -168,7 +169,7 @@ class GroupMaterialTests(TestCase):
|
|||
self.assertEqual(doc.title, "New title")
|
||||
self.assertEqual(doc.get_state_slug(), "active")
|
||||
|
||||
with open(os.path.join(self.agenda_dir, "42", "slides", doc.name + "-" + doc.rev + ".txt")) as f:
|
||||
with open(os.path.join(doc.get_file_path(), doc.name + "-" + doc.rev + ".txt")) as f:
|
||||
self.assertEqual(f.read(), content)
|
||||
|
||||
def test_material_presentations(self):
|
||||
|
|
|
@ -539,7 +539,7 @@ def document_main(request, name, rev=None):
|
|||
if doc.type_id in ("slides", "agenda", "minutes"):
|
||||
can_manage_material = can_manage_materials(request.user, doc.group)
|
||||
presentations = None
|
||||
if doc.type_id=='slides' and doc.get_state_slug('slides') in ['sessonly','active']:
|
||||
if doc.type_id=='slides' and doc.get_state_slug('slides')=='active' :
|
||||
presentations = doc.future_presentations()
|
||||
if doc.meeting_related():
|
||||
# disallow editing meeting-related stuff through this
|
||||
|
|
|
@ -38,24 +38,6 @@ class GroupInfo(models.Model):
|
|||
def ad_role(self):
|
||||
return self.role_set.filter(name='ad').first()
|
||||
|
||||
@property
|
||||
def ad(self):
|
||||
#assert(False) # These methods are deprecated - expect them to go away when the _ad field is removed
|
||||
ad_role = self.ad_role()
|
||||
return ad_role and ad_role.person
|
||||
|
||||
@ad.setter
|
||||
def ad(self,value):
|
||||
#assert(False)
|
||||
self.role_set.filter(name='ad').delete()
|
||||
if value:
|
||||
self.role_set.create(name=RoleName.objects.get(slug='ad'), person=value, email=value.role_email('ad'))
|
||||
|
||||
@property
|
||||
def ad_id(self):
|
||||
#assert(False)
|
||||
return self.ad.id
|
||||
|
||||
@property
|
||||
def features(self):
|
||||
if not hasattr(self, "features_cache"):
|
||||
|
|
|
@ -864,24 +864,16 @@ class Session(models.Model):
|
|||
|
||||
unique_constraints_dict = None
|
||||
|
||||
# Should work on how materials are captured so that deleted things are no longer associated with the session
|
||||
# (We can keep the information about something being added to and removed from a session in the document's history)
|
||||
def agenda(self):
|
||||
items = self.materials.filter(type="agenda",states__type="agenda",states__slug="active")
|
||||
if items and items[0] is not None:
|
||||
return items[0]
|
||||
else:
|
||||
return None
|
||||
return self.materials.filter(type='agenda').exclude(states__type='agenda',states__slug='deleted').first()
|
||||
|
||||
def minutes(self):
|
||||
try:
|
||||
return self.materials.get(type="minutes",states__type="minutes",states__slug="active")
|
||||
except Exception:
|
||||
return None
|
||||
return self.materials.filter(type='minutes').exclude(states__type='minutes',states__slug='deleted').first()
|
||||
|
||||
def slides(self):
|
||||
try:
|
||||
return self.materials.filter(type="slides",states__type="slides",states__slug="active").order_by("order")
|
||||
except Exception:
|
||||
return []
|
||||
return list(self.materials.filter(type='slides').exclude(states__type='slides',states__slug='deleted').order_by('order'))
|
||||
|
||||
def __unicode__(self):
|
||||
if self.meeting.type_id == "interim":
|
||||
|
|
|
@ -23,9 +23,10 @@ def make_meeting_test_data():
|
|||
room.resources = [projector]
|
||||
|
||||
# mars WG
|
||||
mars = Group.objects.get(acronym='mars')
|
||||
slot = TimeSlot.objects.create(meeting=meeting, type_id="session", duration=30 * 60, location=room,
|
||||
time=datetime.datetime.combine(datetime.date.today(), datetime.time(9, 30)))
|
||||
mars_session = Session.objects.create(meeting=meeting, group=Group.objects.get(acronym="mars"),
|
||||
mars_session = Session.objects.create(meeting=meeting, group=mars,
|
||||
attendees=10, requested_by=system_person,
|
||||
requested_duration=20, status_id="schedw",
|
||||
scheduled=datetime.datetime.now())
|
||||
|
@ -44,16 +45,22 @@ def make_meeting_test_data():
|
|||
meeting.agenda = schedule
|
||||
meeting.save()
|
||||
|
||||
doc = Document.objects.create(name='agenda-mars-ietf-42', type_id='agenda', title="Agenda", external_url="agenda-mars")
|
||||
doc = Document.objects.create(name='agenda-mars-ietf-42', type_id='agenda', title="Agenda", external_url="agenda-mars.txt",group=mars)
|
||||
doc.set_state(State.objects.get(type=doc.type_id, slug="active"))
|
||||
mars_session.sessionpresentation_set.add(SessionPresentation(session=mars_session,document=doc,rev=doc.rev))
|
||||
|
||||
doc = Document.objects.create(name='minutes-mars-ietf-42', type_id='minutes', title="Minutes", external_url="minutes-mars")
|
||||
doc = Document.objects.create(name='minutes-mars-ietf-42', type_id='minutes', title="Minutes", external_url="minutes-mars.txt",group=mars)
|
||||
doc.set_state(State.objects.get(type=doc.type_id, slug="active"))
|
||||
mars_session.sessionpresentation_set.add(SessionPresentation(session=mars_session,document=doc,rev=doc.rev))
|
||||
|
||||
doc = Document.objects.create(name='slides-mars-ietf-42', type_id='slides', title="Slideshow", external_url="slides-mars")
|
||||
doc = Document.objects.create(name='slides-mars-ietf-42', type_id='slides', title="Slideshow", external_url="slides-mars.txt",group=mars)
|
||||
doc.set_state(State.objects.get(type=doc.type_id, slug="active"))
|
||||
doc.set_state(State.objects.get(type='reuse_policy',slug='single'))
|
||||
mars_session.sessionpresentation_set.add(SessionPresentation(session=mars_session,document=doc,rev=doc.rev))
|
||||
|
||||
doc = Document.objects.create(name='slides-mars-ietf-42-deleted', type_id='slides', title="Bad Slideshow", external_url="slides-mars-deleted.txt",group=mars)
|
||||
doc.set_state(State.objects.get(type=doc.type_id, slug="deleted"))
|
||||
doc.set_state(State.objects.get(type='reuse_policy',slug='single'))
|
||||
mars_session.sessionpresentation_set.add(SessionPresentation(session=mars_session,document=doc,rev=doc.rev))
|
||||
|
||||
return meeting
|
||||
|
|
|
@ -33,11 +33,27 @@ class MeetingTests(TestCase):
|
|||
with open(path, "w") as f:
|
||||
f.write(content)
|
||||
|
||||
def write_materials_files(self, meeting, session):
|
||||
|
||||
draft = Document.objects.filter(type="draft", group=session.group).first()
|
||||
|
||||
self.write_materials_file(meeting, session.materials.get(type="agenda"),
|
||||
"1. WG status (15 minutes)\n\n2. Status of %s\n\n" % draft.name)
|
||||
|
||||
self.write_materials_file(meeting, session.materials.get(type="minutes"),
|
||||
"1. More work items underway\n\n2. The draft will be finished before next meeting\n\n")
|
||||
|
||||
self.write_materials_file(meeting, session.materials.filter(type="slides").exclude(states__type__slug='slides',states__slug='deleted').first(),
|
||||
"This is a slideshow")
|
||||
|
||||
|
||||
def test_agenda(self):
|
||||
meeting = make_meeting_test_data()
|
||||
session = Session.objects.filter(meeting=meeting, group__acronym="mars").first()
|
||||
slot = TimeSlot.objects.get(scheduledsession__session=session)
|
||||
|
||||
self.write_materials_files(meeting, session)
|
||||
|
||||
time_interval = "%s-%s" % (slot.time.strftime("%H:%M").lstrip("0"), (slot.time + slot.duration).strftime("%H:%M").lstrip("0"))
|
||||
|
||||
# plain
|
||||
|
@ -51,10 +67,17 @@ class MeetingTests(TestCase):
|
|||
self.assertTrue(slot.location.name in agenda_content)
|
||||
self.assertTrue(time_interval in agenda_content)
|
||||
|
||||
# Make sure there's a frame for the agenda and it points to the right place
|
||||
self.assertTrue(any([session.materials.get(type='agenda').href() in x.attrib["data-src"] for x in q('tr div.modal-body div.frame')]))
|
||||
|
||||
# Make sure undeleted slides are present and deleted slides are not
|
||||
self.assertTrue(any([session.materials.filter(type='slides').exclude(states__type__slug='slides',states__slug='deleted').first().title in x.text for x in q('tr div.modal-body ul a')]))
|
||||
self.assertFalse(any([session.materials.filter(type='slides',states__type__slug='slides',states__slug='deleted').first().title in x.text for x in q('tr div.modal-body ul a')]))
|
||||
|
||||
# text
|
||||
# the rest of the results don't have as nicely formatted times
|
||||
time_interval = time_interval.replace(":", "")
|
||||
|
||||
# text
|
||||
r = self.client.get(urlreverse("ietf.meeting.views.agenda", kwargs=dict(num=meeting.number, ext=".txt")))
|
||||
self.assertEqual(r.status_code, 200)
|
||||
agenda_content = r.content
|
||||
|
@ -62,6 +85,7 @@ class MeetingTests(TestCase):
|
|||
self.assertTrue(session.group.name in agenda_content)
|
||||
self.assertTrue(session.group.parent.acronym.upper() in agenda_content)
|
||||
self.assertTrue(slot.location.name in agenda_content)
|
||||
|
||||
self.assertTrue(time_interval in agenda_content)
|
||||
|
||||
# CSV
|
||||
|
@ -73,6 +97,10 @@ class MeetingTests(TestCase):
|
|||
self.assertTrue(session.group.parent.acronym.upper() in agenda_content)
|
||||
self.assertTrue(slot.location.name in agenda_content)
|
||||
|
||||
self.assertTrue(session.materials.get(type='agenda').external_url in r.content)
|
||||
self.assertTrue(session.materials.filter(type='slides').exclude(states__type__slug='slides',states__slug='deleted').first().external_url in r.content)
|
||||
self.assertFalse(session.materials.filter(type='slides',states__type__slug='slides',states__slug='deleted').first().external_url in r.content)
|
||||
|
||||
# iCal
|
||||
r = self.client.get(urlreverse("ietf.meeting.views.ical_agenda", kwargs=dict(num=meeting.number))
|
||||
+ "?" + session.group.parent.acronym.upper())
|
||||
|
@ -84,6 +112,11 @@ class MeetingTests(TestCase):
|
|||
self.assertTrue("BEGIN:VTIMEZONE" in agenda_content)
|
||||
self.assertTrue("END:VTIMEZONE" in agenda_content)
|
||||
|
||||
self.assertTrue(session.agenda().get_absolute_url() in r.content)
|
||||
self.assertTrue(session.materials.filter(type='slides').exclude(states__type__slug='slides',states__slug='deleted').first().get_absolute_url() in r.content)
|
||||
# TODO - the ics view uses .all on a queryset in a view so it's showing the deleted slides.
|
||||
#self.assertFalse(session.materials.filter(type='slides',states__type__slug='slides',states__slug='deleted').first().get_absolute_url() in r.content)
|
||||
|
||||
# week view
|
||||
r = self.client.get(urlreverse("ietf.meeting.views.week_view", kwargs=dict(num=meeting.number)))
|
||||
self.assertEqual(r.status_code, 200)
|
||||
|
@ -94,16 +127,8 @@ class MeetingTests(TestCase):
|
|||
def test_materials(self):
|
||||
meeting = make_meeting_test_data()
|
||||
session = Session.objects.filter(meeting=meeting, group__acronym="mars").first()
|
||||
draft = Document.objects.filter(type="draft", group=session.group).first()
|
||||
|
||||
self.write_materials_file(meeting, session.materials.get(type="agenda"),
|
||||
"1. WG status (15 minutes)\n\n2. Status of %s\n\n" % draft.name)
|
||||
|
||||
self.write_materials_file(meeting, session.materials.get(type="minutes"),
|
||||
"1. More work items underway\n\n2. The draft will be finished before next meeting\n\n")
|
||||
|
||||
self.write_materials_file(meeting, session.materials.get(type="slides"),
|
||||
"This is a slideshow")
|
||||
self.write_materials_files(meeting, session)
|
||||
|
||||
# session agenda
|
||||
r = self.client.get(urlreverse("ietf.meeting.views.session_agenda",
|
||||
|
@ -123,6 +148,7 @@ class MeetingTests(TestCase):
|
|||
self.assertTrue(row.find('a:contains("Agenda")'))
|
||||
self.assertTrue(row.find('a:contains("Minutes")'))
|
||||
self.assertTrue(row.find('a:contains("Slideshow")'))
|
||||
self.assertFalse(row.find("a:contains(\"Bad Slideshow\")"))
|
||||
|
||||
# FIXME: missing tests of .pdf/.tar generation (some code can
|
||||
# probably be lifted from similar tests in iesg/tests.py)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2,11 +2,14 @@
|
|||
|
||||
# boiler plate
|
||||
import os, sys
|
||||
import django
|
||||
|
||||
basedir = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../..'))
|
||||
sys.path.insert(0, basedir)
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ietf.settings")
|
||||
|
||||
django.setup()
|
||||
|
||||
# script
|
||||
from django.core.serializers import serialize
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ FROM_LIST = ('IETF Secretariat <ietf-secretariat@ietf.org>',
|
|||
'IETF Registrar <ietf-registrar@ietf.org>',
|
||||
'IETF Administrative Director <iad@ietf.org>',
|
||||
'IETF Executive Director <exec-director@ietf.org>',
|
||||
'The IAOC <bob.hinden@gmail.com>',
|
||||
'The IAOC <cgriffiths@gmail.com>',
|
||||
'The IETF Trust <ietf-trust@ietf.org>',
|
||||
'RSOC Chair <rsoc-chair@iab.org>',
|
||||
'ISOC Board of Trustees <eburger@standardstrack.com>',
|
||||
|
@ -61,7 +61,7 @@ def get_from_choices(user):
|
|||
elif has_role(user,'IAB Chair'):
|
||||
f = (FROM_LIST[6],)
|
||||
elif has_role(user,'IAD'):
|
||||
f = (FROM_LIST[9],)
|
||||
f = (FROM_LIST[9],FROM_LIST[12],FROM_LIST[18],FROM_LIST[11],)
|
||||
#RSOC Chair, IAOC Chair aren't supported by has_role()
|
||||
elif Role.objects.filter(person=person,
|
||||
group__acronym='rsoc',
|
||||
|
|
|
@ -912,8 +912,10 @@ def upload_unified(request, meeting_num, acronym=None, session_id=None):
|
|||
handle_upload_file(file,disk_filename,meeting,material_type.slug)
|
||||
|
||||
# set Doc state
|
||||
state = State.objects.get(type=doc.type,slug='active')
|
||||
doc.set_state(state)
|
||||
state = State.objects.get(type=doc.type,slug='active' if doc.type.slug!='slides' else 'archived')
|
||||
if doc.type.slug=='slides':
|
||||
doc.set_state(state)
|
||||
doc.set_state(State.objects.get(type='reuse_policy',slug='single'))
|
||||
|
||||
# create session relationship, per Henrik we should associate documents to all sessions
|
||||
# for the current meeting (until tools support different materials for diff sessions)
|
||||
|
|
|
@ -430,8 +430,8 @@ IDSUBMIT_DEFAULT_CUTOFF_TIME_UTC = datetime.timedelta(hours=23, minutes=59, seco
|
|||
IDSUBMIT_DEFAULT_CUTOFF_WARNING_DAYS = datetime.timedelta(days=21)
|
||||
|
||||
MEETING_MATERIALS_SUBMISSION_START_DAYS = -90
|
||||
MEETING_MATERIALS_SUBMISSION_CUTOFF_DAYS = 33
|
||||
MEETING_MATERIALS_SUBMISSION_CORRECTION_DAYS = 52
|
||||
MEETING_MATERIALS_SUBMISSION_CUTOFF_DAYS = 26
|
||||
MEETING_MATERIALS_SUBMISSION_CORRECTION_DAYS = 50
|
||||
|
||||
INTERNET_DRAFT_DAYS_TO_EXPIRE = 185
|
||||
|
||||
|
|
|
@ -319,6 +319,9 @@ def make_test_data():
|
|||
def other_doc_factory(type_id,name):
|
||||
doc = Document.objects.create(type_id=type_id,name=name,rev='00',group=mars_wg)
|
||||
DocAlias.objects.create(name=name,document=doc)
|
||||
doc.set_state(State.objects.get(type__slug=doc.type.slug,slug='active'))
|
||||
if type_id=='slides':
|
||||
doc.set_state(State.objects.get(type='reuse_policy',slug='single'))
|
||||
other_doc_factory('agenda','agenda-42-mars')
|
||||
other_doc_factory('minutes','minutes-42-mars')
|
||||
other_doc_factory('slides','slides-42-mars-1')
|
||||
|
|
Loading…
Reference in a new issue