Changeset - d982ed8e32d8
[Not reviewed]
pylons_app/config/routing.py
Show inline comments
 
"""Routes configuration
 

	
 
The more specific and detailed routes should be defined first so they
 
may take precedent over the more generic routes. For more information
 
refer to the routes manual at http://routes.groovie.org/docs/
 
"""
 
from routes import Mapper
 

	
 
def make_map(config):
 
    """Create, configure and return the routes Mapper"""
 
    map = Mapper(directory=config['pylons.paths']['controllers'],
 
                 always_scan=config['debug'])
 
    map.minimization = False
 
    map.explicit = False
 

	
 
    # The ErrorController route (handles 404/500 error pages); it should
 
    # likely stay at the top, ensuring it can always be resolved
 
    map.connect('/error/{action}', controller='error')
 
    map.connect('/error/{action}/{id}', controller='error')
 

	
 
    # CUSTOM ROUTES HERE
 
    map.connect('hg_home', '/', controller='hg', action='index')
 
    
 
    
 
    #REST controllers
 
    map.resource('repo', 'repos', path_prefix='/_admin')
 
    map.resource('user', 'users', path_prefix='/_admin')
 
    map.resource('permission', 'permissions', path_prefix='/_admin')
 
    
 
    #ADMIN
 
    with map.submapper(path_prefix='/_admin', controller='admin') as m:
 
        m.connect('admin_home', '/', action='index')#main page
 
        m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}',
 
                  action='add_repo')
 
    
 
    #FEEDS
 
    map.connect('rss_feed_home', '/{repo_name}/feed/rss',
 
                controller='feed', action='rss')
 
    map.connect('atom_feed_home', '/{repo_name}/feed/atom',
 
                controller='feed', action='atom')
 
    
 
    map.connect('login_home', '/login', controller='login')
 
    map.connect('logout_home', '/logout', controller='login', action='logout')
 
    
 
    map.connect('changeset_home', '/{repo_name}/changeset/{revision}',
 
                controller='changeset', revision='tip')
 
    map.connect('summary_home', '/{repo_name}/summary',
 
                controller='summary')
 
    map.connect('shortlog_home', '/{repo_name}/shortlog',
 
                controller='shortlog')
 
    map.connect('branches_home', '/{repo_name}/branches',
 
                controller='branches')
 
    map.connect('tags_home', '/{repo_name}/tags',
 
                controller='tags')
 
    map.connect('changelog_home', '/{repo_name}/changelog',
 
                controller='changelog')    
 
    map.connect('files_home', '/{repo_name}/files/{revision}/{f_path:.*}',
 
                controller='files', revision='tip', f_path='')
 
    map.connect('files_diff_home', '/{repo_name}/diff/{f_path:.*}',
 
                controller='files', action='diff', revision='tip', f_path='')
 
    map.connect('files_raw_home', '/{repo_name}/rawfile/{revision}/{f_path:.*}',
 
                controller='files', action='rawfile', revision='tip', f_path='')
 
    map.connect('files_annotate_home', '/{repo_name}/annotate/{revision}/{f_path:.*}',
 
                controller='files', action='annotate', revision='tip', f_path='')    
 
    map.connect('files_archive_home', '/{repo_name}/archive/{revision}/{fileformat}',
 
                controller='files', action='archivefile', revision='tip')
 
    return map
pylons_app/controllers/permissions.py
Show inline comments
 
new file 100644
 
import logging
 

	
 
from pylons import request, response, session, tmpl_context as c, url
 
from pylons.controllers.util import abort, redirect
 

	
 
from pylons_app.lib.base import BaseController, render
 

	
 
log = logging.getLogger(__name__)
 

	
 
class PermissionsController(BaseController):
 
    """REST Controller styled on the Atom Publishing Protocol"""
 
    # To properly map this controller, ensure your config/routing.py
 
    # file has a resource setup:
 
    #     map.resource('permission', 'permissions')
 

	
 
    def index(self, format='html'):
 
        """GET /permissions: All items in the collection"""
 
        # url('permissions')
 
        return render('admin/permissions/permissions.html')
 

	
 
    def create(self):
 
        """POST /permissions: Create a new item"""
 
        # url('permissions')
 

	
 
    def new(self, format='html'):
 
        """GET /permissions/new: Form to create a new item"""
 
        # url('new_permission')
 

	
 
    def update(self, id):
 
        """PUT /permissions/id: Update an existing item"""
 
        # Forms posted to this method should contain a hidden field:
 
        #    <input type="hidden" name="_method" value="PUT" />
 
        # Or using helpers:
 
        #    h.form(url('permission', id=ID),
 
        #           method='put')
 
        # url('permission', id=ID)
 

	
 
    def delete(self, id):
 
        """DELETE /permissions/id: Delete an existing item"""
 
        # Forms posted to this method should contain a hidden field:
 
        #    <input type="hidden" name="_method" value="DELETE" />
 
        # Or using helpers:
 
        #    h.form(url('permission', id=ID),
 
        #           method='delete')
 
        # url('permission', id=ID)
 

	
 
    def show(self, id, format='html'):
 
        """GET /permissions/id: Show a specific item"""
 
        # url('permission', id=ID)
 

	
 
    def edit(self, id, format='html'):
 
        """GET /permissions/id/edit: Form to edit an existing item"""
 
        # url('edit_permission', id=ID)
pylons_app/public/css/monoblue_custom.css
Show inline comments
 
/*** Initial Settings ***/
 
#mainhtml{
 
	margin: 15px 50px;
 
	background: #DBD4C6;
 
	font-family: sans-serif;
 
}
 

	
 
a {
 
	color: #556CB5;
 
	text-decoration: none;
 
}
 
a:HOVER{
 
	text-decoration: underline;
 
}
 

	
 
/*** end of Initial Settings ***/ 
 

	
 
/*** ***/
 
.table_disp {
 
    border-left: 0px solid #666666;
 
    border-bottom: 1px solid #666666;
 
    border-right: 1px solid #666666;
 
    padding: 0px;
 
    margin: 0px;
 
    border-spacing: 0px;    
 
}
 

	
 
.table_disp .header {
 
    border-top: 1px solid #666666;
 
    background-color: #556CB5;
 
    font-weight: bold;
 
    color: white;
 
    vertical-align: middle;
 
    padding: 3px 5px;
 
    text-align: left;
 
    font-size: 0.9em;
 
}
 

	
 
.table_disp .header td {
 
    padding: 4px;
 
    vertical-align: middle;
 
    border-top: 1px solid #AAAAAA;
 
    border-bottom: 2px solid #666666;
 
}
 
.table_disp td {
 
    border-left: 1px solid #AAAAAA;
 
    padding-left: 2px;
 
    padding-right: 0px;
 
}
 

	
 
table tr.parity0:hover,table tr.parity1:hover {
 
    background: #D5E1E6;
 
}
 

	
 
table tr.parity0 {
 
    background: #EAEAE9;
 
}
 

	
 
table tr.parity1 {
 
    background: #FFFFFF;
 
}
 

	
 

	
 
/*** ***/
 

	
 
/** common settings **/
 
.add_icon{
 
    background: url("/images/icons/add.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 

	
 
}
 
.edit_icon{
 
    background: url("/images/icons/folder_edit.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 
}
 

	
 
.delete_icon{
 
    background: url("/images/icons/delete.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 

	
 
}
 

	
 
.action_button{
 
    border:0px;
 
    display: block;
 
}
 
.action_button:hover{
 
    border:0px;
 
    font-style:italic;
 
    cursor: pointer;
 
}
 

	
 
div#main {
 
	padding: 5px;
 
}
 

	
 
div#container {
 
	background: #FFFFFF;
 
	position: relative;
 
	color: #666;
 
}
 

	
 
div.page-header {
 
	padding: 50px 20px 0;
 
	background: #556cb5 top left repeat-x;
 
	position: relative;
 
}
 

	
 
div.page-header h1 {
 
	margin: 10px 0 30px;
 
	font-size: 1.8em;
 
	font-weight: bold;
 
	font-family: sans-serif;
 
	letter-spacing: 1px;
 
	color: #DDD;
 
	color: #FFFFFF;
 
}
 

	
 
div.page-header h1 a {
 
	font-weight: bold;
 
	color: #FFF;
 
	color: #FFFFFF;
 
}
 

	
 
div.page-header a {
 
	text-decoration: none;
 
}
 

	
 
div.page-header form {
 
	position: absolute;
 
	margin-bottom: 2px;
 
	bottom: 0;
 
	right: 20px;
 
}
 

	
 
div.page-header form label {
 
	color: #DDD;
 
}
 

	
 
div.page-header form input {
 
	padding: 2px;
 
	border: solid 1px #DDD;
 
}
 

	
 
div.page-header form dl {
 
	overflow: hidden;
 
}
 

	
 
div.page-header form dl dt {
 
	font-size: 1.2em;
 
}
 

	
 
div.page-header form dl dt,div.page-header form dl dd {
 
	margin: 0 0 0 5px;
 
	float: left;
 
	height: 24px;
 
	line-height: 20px;
 
}
 

	
 
ul.page-nav {
 
	margin: 10px 0 0 0;
 
	list-style-type: none;
 
	overflow: hidden;
 
	width: 800px;
 
	padding: 0;
 
}
 

	
 
ul.page-nav li {
 
	margin: 0 4px 0 0;
 
	float: left;
 
	height: 24px;
 
	font-size: 1.1em;
 
	line-height: 24px;
 
	text-align: center;
 
	background: #556CB5;
 
}
 

	
 
ul.page-nav li.current {
 
	background: #FFF;
 
	padding-right: 5px;
 
	padding-left: 5px;
 
}
 
ul.page-nav li.current a {
 
	color: #556CB5;
 
}
 
ul.page-nav li a {
 
	height: 24px;
 
	color: #FFF;
 
	padding-right: 5px;
 
	padding-left: 5px;
 
	display: block;
 
	text-decoration: none;
 
	font-weight: bold;
 
}
 
ul.page-nav li.logout a {
 
	color: #FDAC9D;
 
}
 
ul.page-nav li a:hover {
 
	background: #FFF;
 
	color: #556CB5;
 
}
 

	
 
ul.submenu {
 
	margin: 5px 0px -20px 0px;
 
	list-style-type: none;
 
}
 

	
 
ul.submenu li {
 
	margin: 0 10px 0 0;
 
	font-size: 0.9em;
 
	font-weight:bold;
 
	display: inline;
 
}
 
ul.submenu .repos {
 
    background: url("/images/icons/folder_edit.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 
   
 
}
 
ul.submenu .users {
 
    background: url("/images/icons/user_edit.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 
}
 
ul.submenu .permissions {
 
    background: url("/images/icons/folder_key.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 
}
 

	
 
ul.submenu .current_submenu {
 
    border-bottom: 2px solid #556CB5;
 
}
 

	
 
h2 {
 
	margin: 20px 0 10px;
 
	height: 30px;
 
	line-height: 30px;
 
	text-indent: 20px;
 
	background: #FFF;
 
	font-size: 1.2em;
 
	border-top: dotted 1px #D5E1E6;
 
	font-weight: bold;
 
	color:#556CB5;
 
}
 

	
 
h2.no-link {
 
	color: #006699;
 
}
 

	
 
h2.no-border {
 
	color: #FFF;
 
	background: #556CB5;
 
	border: 0;
 
}
 

	
 
h2 a {
 
	font-weight: bold;
 
	color: #006699;
 
}
 

	
 
div.page-path {
 
	text-align: right;
 
	padding: 20px 30px 10px 0;
 
	border: solid #d9d8d1;
 
	border-width: 0px 0px 1px;
 
	font-size: 1.2em;
 
}
 

	
 
div.page-footer {
 
	margin: 50px 0 0;
 
	position: relative;
 
	text-align: center;
 
	font-weight: bold;
 
	font-size: 90%;
 
}
 

	
 
div.page-footer p {
 
	position: relative;
 
	left: 20px;
 
	bottom: 5px;
 
	font-size: 1.2em;
 
}
 

	
 
ul.rss-logo {
 
	position: absolute;
 
	top: -10px;
 
	right: 20px;
 
	height: 20px;
 
	list-style-type: none;
 
}
 

	
 
ul.rss-logo li {
 
	display: inline;
 
}
 

	
 
ul.rss-logo li a {
 
	padding: 3px 6px;
 
	line-height: 10px;
 
	border: 1px solid;
 
	border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e;
 
	color: #ffffff;
 
	background-color: #ff6600;
 
	font-weight: bold;
 
	font-family: sans-serif;
 
	font-size: 10px;
 
	text-align: center;
 
	text-decoration: none;
pylons_app/templates/admin/admin.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Administration')}
 
</%def>
 
<%def name="breadcrumbs()">
 
	${h.link_to(u'Admin',h.url('admin_home'))}
 
	 /  
 
</%def>
 
<%def name="page_nav()">
 
	${self.menu('admin')}
 
	${self.submenu('')}
 
</%def>
 
<%def name="main()">
 
    %if c.admin_user:
 
	    <div>
 
	        <h2>Welcome ${c.admin_username}</h2>
 
			    <div id="user_log">
 
					${c.log_data}
 
				</div>
 
	    </div>
 
    %else:
 
		<h2>${_('Sorry only admin users can acces this area')}</h2>
 
    %endif
 
    
 
</%def>
 
\ No newline at end of file
pylons_app/templates/admin/permissions/permissions.html
Show inline comments
 
new file 100644
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Permissions administration')}
 
</%def>
 
<%def name="breadcrumbs()">
 
	${h.link_to(u'Admin',h.url('admin_home'))}
 
	 /  
 
	 ${_('Permissions')}
 
</%def>
 
<%def name="page_nav()">
 
	${self.menu('admin')}
 
	${self.submenu('permissions')}
 
</%def>
 
<%def name="main()">
 
	<div>
 
	<h2>${_('Permissions')}</h2>
 
	todo :) 
 
    </div>
 
</%def>    
pylons_app/templates/admin/repos/repo_add.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Repositories administration')}
 
</%def>
 
<%def name="breadcrumbs()">
 
	${h.link_to(u'Admin',h.url('admin_home'))}
 
	 /  
 
	${_('Repos')}
 
</%def>
 
<%def name="page_nav()">
 
	${self.menu('admin')}
 
	${self.submenu('repos')}
 
</%def>
 
<%def name="main()">
 
	<div>
 
        <h2>${_('Repositories')} - ${_('add new')}</h2>
 
        ${h.form(url('repos'))}
 
        <table>
 
        	<tr>
 
        		<td>${_('Name')}</td>
 
        		<td>${h.text('name',c.new_repo)}</td>
 
        	</tr>
 
        	<tr>
 
        		<td>${_('Description')}</td>
 
        		<td>${h.textarea('description',cols=23,rows=5)}</td>
 
        	</tr>
 
        	<tr>
 
        		<td>${_('Private')}</td>
 
        		<td>${h.checkbox('private')}</td>
 
        	</tr>
 
        	<tr>
 
        		<td></td>
 
        		<td>${h.submit('add','add')}</td>
 
        	</tr>
 
        	        	        	
 
        </table>
 
        ${h.end_form()}
 
    </div>
 
</%def>   
pylons_app/templates/admin/repos/repo_edit.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Repositories administration')}
 
</%def>
 
<%def name="breadcrumbs()">
 
	${h.link_to(u'Admin',h.url('admin_home'))}
 
	 /  
 
	 ${_('Repos')}
 
</%def>
 
<%def name="page_nav()">
 
	${self.menu('admin')}
 
	${self.submenu('repos')}
 
</%def>
 
<%def name="main()">
 
	<div>
 
        <h2>${_('Repositories')} - ${_('edit')}</h2>
 
        ${h.form(url('repo', id=ID),method='put'))}
 
        ${h.form(url('repo', id=c.new_repo),method='put')}
 
        <table>
 
        	<tr>
 
        		<td>${_('Name')}</td>
 
        		<td>${h.text('name',c.new_repo)}</td>
 
        	</tr>
 
        	<tr>
 
        		<td>${_('Description')}</td>
 
        		<td>${h.textarea('description',cols=23,rows=5)}</td>
 
        	</tr>
 
        	<tr>
 
        		<td>${_('Private')}</td>
 
        		<td>${h.checkbox('private')}</td>
 
        	</tr>
 
        	<tr>
 
        		<td></td>
 
        		<td>${h.submit('update','update')}</td>
 
        	</tr>
 
        	        	        	
 
        </table>
 
        ${h.end_form()}
 
    </div>
 
</%def>   
pylons_app/templates/admin/repos/repos.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Repositories administration')}
 
</%def>
 
<%def name="breadcrumbs()">
 
	${h.link_to(u'Admin',h.url('admin_home'))}
 
	 /  
 
	 ${_('Repos')}
 
</%def>
 
<%def name="page_nav()">
 
	${self.menu('admin')}
 
	${self.submenu('repos')}
 
</%def>
 
<%def name="main()">
 
	<div>
 
        <h2>${_('Repositories administration')}</h2>
 
        <table class="table_disp">
 
        <tr class="header">
 
            <td>${_('name')}</td>
 
            <td>${_('last revision')}</td>
 
            <td>${_('action')}</td>
 
        </tr>
 
	        %for cnt,repo in enumerate(c.repos_list):
 
	 		<tr class="parity${cnt%2}">
 
			    <td>${h.link_to(repo['name'],h.url('edit_repo',id=repo['name']))}</td>
 
		        <td>r${repo['rev']}:${repo['tip']}</td>
 
                <td>
 
                  ${h.form(url('repo', id=repo['name']),method='delete')}
 
                  	${h.submit('remove','delete',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")}
 
                  ${h.end_form()}
 
     			</td>
 
			</tr>
 
			%endfor
 
		</table>
 
		<span class="add_icon">${h.link_to(u'add repo',h.url('new_repo'))}</span>    
 
    </div>
 
</%def>    
pylons_app/templates/admin/users/user_add.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('User administration')}
 
</%def>
 
<%def name="breadcrumbs()">
 
	${h.link_to(u'Admin',h.url('admin_home'))}
 
	 /  
 
	 ${_('Users')}
 
</%def>
 
<%def name="page_nav()">
 
	${self.menu('admin')}
 
	${self.submenu('users')}
 
</%def>
 
<%def name="main()">
 
	<div>
 
        <h2>${_('User')} - ${_('add new')}</h2>
 
        ${h.form(url('users'))}
 
        <table>
 
        	<tr>
 
        		<td>${_('Username')}</td>
 
        		<td>${h.text('username')}</td>
 
        	</tr>
 
        	<tr>
 
        		<td>${_('password')}</td>
 
        		<td>${h.text('password')}</td>
 
        	</tr>
 
        	<tr>
 
        		<td>${_('Active')}</td>
 
        		<td>${h.checkbox('active')}</td>
 
        	</tr>
 
        	<tr>
 
        		<td></td>
 
        		<td>${h.submit('add','add')}</td>
 
        	</tr>
 
        	        	        	
 
        </table>
 
        ${h.end_form()}
 
    </div>
 
</%def>    
 
\ No newline at end of file
pylons_app/templates/admin/users/user_edit.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('User administration')}
 
</%def>
 
<%def name="breadcrumbs()">
 
	${h.link_to(u'Admin',h.url('admin_home'))}
 
	 /  
 
	${_('Users')}
 
</%def>
 
<%def name="page_nav()">
 
	${self.menu('admin')}
 
	${self.submenu('users')}
 
</%def>
 
<%def name="main()">
 
	<div>
 
        <h2>${_('User')} - ${c.user.username}</h2>
 
        ${h.form(url('user', id=c.user.user_id),method='put')}
 
        <table>
 
        	<tr>
 
        		<td>${_('Username')}</td>
 
        		<td>${h.text('username')}</td>
 
        	</tr>
 
        	<tr>
 
        		<td>${_('New password')}</td>
 
        		<td>${h.text('new_password')}</td>
 
        	</tr>
 
        	<tr>
 
        		<td>${_('Active')}</td>
 
        		<td>${h.checkbox('active',value=True)}</td>
 
        	</tr>
 
        	<tr>
 
        		<td></td>
 
        		<td>${h.submit('save','save')}</td>
 
        	</tr>
 
        	        	        	
 
        </table>
 
        ${h.end_form()}
 
    </div>
 
</%def>  
 
\ No newline at end of file
pylons_app/templates/admin/users/users.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Users administration')}
 
</%def>
 
<%def name="breadcrumbs()">
 
	${h.link_to(u'Admin',h.url('admin_home'))}
 
	 /  
 
	 ${_('Users')}
 
</%def>
 
<%def name="page_nav()">
 
	${self.menu('admin')}
 
	${self.submenu('users')}
 
</%def>
 
<%def name="main()">
 
	<div>
 
        <h2>${_('Mercurial users')}</h2>
 
        <table class="table_disp">
 
         <tr class="header">
 
            <td>${_('id')}</td>
 
            <td>${_('username')}</td>
 
            <td>${_('active')}</td>
 
            <td>${_('admin')}</td>
 
            <td>${_('action')}</td>
 
         </tr>
 
            %for user in c.users_list:
 
                <tr>
 
                    <td>${user.user_id}</td>
 
                    <td>${h.link_to(user.username,h.url('edit_user', id=user.user_id))}</td>
 
                    <td>${user.active}</td>
 
                    <td>${user.admin}</td>
 
                    <td>
 
	                    ${h.form(url('user', id=user.user_id),method='delete')}
 
	                    	${h.submit('remove','delete',class_="delete_icon action_button")}
 
	                    ${h.end_form()}
 
        			</td>
 
                </tr>
 
            %endfor
 
        </table>
 
        <span class="add_icon">${h.link_to(u'add user',h.url('new_user'))}</span>        
 
    </div>
 
</%def>
pylons_app/tests/functional/test_permissions.py
Show inline comments
 
new file 100644
 
from pylons_app.tests import *
 

	
 
class TestPermissionsController(TestController):
 

	
 
    def test_index(self):
 
        response = self.app.get(url('permissions'))
 
        # Test response...
 

	
 
    def test_index_as_xml(self):
 
        response = self.app.get(url('formatted_permissions', format='xml'))
 

	
 
    def test_create(self):
 
        response = self.app.post(url('permissions'))
 

	
 
    def test_new(self):
 
        response = self.app.get(url('new_permission'))
 

	
 
    def test_new_as_xml(self):
 
        response = self.app.get(url('formatted_new_permission', format='xml'))
 

	
 
    def test_update(self):
 
        response = self.app.put(url('permission', id=1))
 

	
 
    def test_update_browser_fakeout(self):
 
        response = self.app.post(url('permission', id=1), params=dict(_method='put'))
 

	
 
    def test_delete(self):
 
        response = self.app.delete(url('permission', id=1))
 

	
 
    def test_delete_browser_fakeout(self):
 
        response = self.app.post(url('permission', id=1), params=dict(_method='delete'))
 

	
 
    def test_show(self):
 
        response = self.app.get(url('permission', id=1))
 

	
 
    def test_show_as_xml(self):
 
        response = self.app.get(url('formatted_permission', id=1, format='xml'))
 

	
 
    def test_edit(self):
 
        response = self.app.get(url('edit_permission', id=1))
 

	
 
    def test_edit_as_xml(self):
 
        response = self.app.get(url('formatted_edit_permission', id=1, format='xml'))
0 comments (0 inline, 0 general)