fix base html refs, changes to tests.py

- Legacy-Id: 5178
This commit is contained in:
Ryan Cross 2013-01-09 00:45:13 +00:00
parent 37d99c44b1
commit f496498e12
5 changed files with 24 additions and 41 deletions

View file

@ -6,75 +6,56 @@ from django.test import TestCase
from django.test.client import Client
from ietf.group.models import Group
from ietf.ietfauth.decorators import has_role
from ietf.utils.test_data import make_test_data
from ietf.utils.test_utils import SimpleUrlTestCase, RealDatabaseTest
from ietf.idtracker.models import Role
from urlparse import urlsplit
from pyquery import PyQuery
#from pyquery import PyQuery
SEC_USER='secretary'
class SreqUrlTestCase(SimpleUrlTestCase):
def testUrls(self):
self.doTestUrls(__file__)
"""
SEC_USER='rcross'
WG_USER=''
AD_USER=''
class MainTestCase(TestCase):
fixtures = ['names',
'test-meeting',
'test-group',
'test-person',
'test-user',
'test-email',
'test-role']
fixtures = ['names']
# ------- Test View -------- #
def test_main(self):
draft = make_test_data()
url = reverse('sessions')
r = self.client.get(url,REMOTE_USER=SEC_USER)
self.assertEquals(r.status_code, 200)
#assert False, (r.context)
sched = r.context['scheduled_groups']
unsched = r.context['unscheduled_groups']
self.failUnless(len(sched) == 0)
self.failUnless(len(unsched) == 5)
#ancp = Group.objects.get(acronym='ancp')
paws = Group.objects.get(acronym='paws')
#self.failUnless(ancp in sched)
self.failUnless(paws in unsched)
#assert False, r.content
#user = User.objects.get(username='rcross')
#self.failUnless(has_role(user,'Secretariat'))
self.failUnless(len(unsched) > 0)
class SubmitRequestCase(TestCase):
fixtures = ['names',
'test-meeting',
'test-group',
'test-person',
'test-user',
'test-email',
'test-role']
fixtures = ['names']
def test_submit_request(self):
url = reverse('sessions_new',kwargs={'acronym':'ancp'})
draft = make_test_data()
acronym = Group.objects.all()[0].acronym
url = reverse('sessions_new',kwargs={'acronym':acronym})
post_data = {'id_num_session':'1',
'id_length_session1':'3600',
'id_attendees':'10',
'id_conflict1':'core',
'id_conflict1':'',
'id_comments':'need projector'}
self.client.login(remote_user='rcross')
self.client.login(remote_user=SEC_USER)
r = self.client.post(url,post_data)
self.assertEquals(r.status_code, 200)
"""
#assert False, self.client.session..__dict__
url = reverse('sessions_confirm',kwargs={'acronym':'ancp'})
url = reverse('sessions_confirm',kwargs={'acronym':acronym})
#s = self.client.session
#s['session_form'] = post_data
r = self.client.get(url)
assert False, r.content
"""
class EditRequestCase(TestCase):
pass
@ -89,5 +70,4 @@ class RetrievePreviousCase(TestCase):
# test error if already scheduled
# test get previous exists/doesn't exist
# test that groups scheduled and unscheduled add up to total groups
# test locking function, access by unauthorized
"""
# test locking function, access by unauthorized

View file

@ -0,0 +1,3 @@
200 /secr/
200 /secr/sreq/
200 /secr/sreq/6lowpan/new/

View file

@ -5,7 +5,7 @@
<link rel="stylesheet" type="text/css" href="{% block stylesheet %}/secr/css/base.css{% endblock %}" />
<link rel="stylesheet" type="text/css" href="/secr/css/forms.css" />
<link rel="stylesheet" type="text/css" href="/secr/css/custom.css" />
{% if server_mode == "test" %}
{% if not server_mode == "production" %}
<link rel="stylesheet" type="text/css" href="/secr/css/test.css" />
{% endif %}
{% block extrastyle %}{% endblock %}
@ -38,7 +38,7 @@
<table width="100%">
<tr>
<td align="left">
{% block breadcrumbs %}<a href="/">Home</a>{% endblock %}
{% block breadcrumbs %}<a href="/secr/">Home</a>{% endblock %}
</td>
<td align="right">
{% block instructions %}{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "base_secr.html" %}
{% load i18n %}
{% block title %}{{ title }}{% if request.user_is_secretariat %} Secretariat Dashboard {% else %} WG Chair Dashboard {% endif %}{% endblock %}

View file

@ -1,4 +1,4 @@
<li><a href="http://www.ietf.org/wg/request-tool-instructions.html" target="_blank">Instructions</a>.</li>
<li><a href="{% url proceedings %}">IETF Meeting Materials Management Tool</a>.</li>
<li><a href="{# {% url proceedings %} #}">IETF Meeting Materials Management Tool</a>.</li>
<li>If you require assistance in using this tool, or wish to report a bug, then please send a message to <a href="mailto:ietf-action@ietf.org">ietf-action@ietf.org</a>.</li>
<li>To submit your request via email, please send your request to <a href="mailto:agenda@ietf.org">agenda@ietf.org</a>.</li>