Holger Frey
7 years ago
4 changed files with 51 additions and 1 deletions
@ -0,0 +1,15 @@ |
|||||||
|
{% extends "ordr2:templates/layout.jinja2" %} |
||||||
|
|
||||||
|
{% block title %} Ordr | Account Registration {% endblock title %} |
||||||
|
|
||||||
|
{% block content %} |
||||||
|
<div class="row justify-content-center"> |
||||||
|
<div class="col-8"> |
||||||
|
|
||||||
|
<div class="jumbotron"> |
||||||
|
<h1>Account Registration</h1> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{% endblock content %} |
@ -0,0 +1,14 @@ |
|||||||
|
''' account registration, login, logout and settings ''' |
||||||
|
|
||||||
|
from pyramid.view import view_config |
||||||
|
|
||||||
|
|
||||||
|
@view_config( |
||||||
|
context='ordr2:resources.account.AccountResource', |
||||||
|
name='register', |
||||||
|
permission='register', |
||||||
|
renderer='ordr2:templates/account/register.jinja2' |
||||||
|
) |
||||||
|
def register(context, request): |
||||||
|
''' the new user registraion page ''' |
||||||
|
return {} |
@ -0,0 +1,21 @@ |
|||||||
|
''' tests for the common layout and simple (static)''' |
||||||
|
|
||||||
|
from . import testapp |
||||||
|
|
||||||
|
|
||||||
|
def test_account_register_unauthenticated(testapp): |
||||||
|
''' test the registration page for a unauthenticated user ''' |
||||||
|
testapp.reset() |
||||||
|
|
||||||
|
response = testapp.get('/account/register') |
||||||
|
|
||||||
|
# basic content test |
||||||
|
assert 'Ordr | Account Registration' in response |
||||||
|
assert '<!-- No logged in user -->' in response |
||||||
|
# test the main nav section links and highlighting |
||||||
|
li_one, li_two = response.html.find_all('li', class_='nav-item') |
||||||
|
assert 'active' not in li_one['class'] |
||||||
|
assert li_one.find('a').text == 'FAQs' |
||||||
|
assert 'active' in li_two['class'] |
||||||
|
assert li_two.find('a').text == 'Register' |
||||||
|
|
Reference in new issue