##// END OF EJS Templates
rhodecode.js: fix indentation
rhodecode.js: fix indentation

File last commit:

r4116:ffd45b18 rhodecode-2.2.5-gpl
r4158:e4848cd9 rhodecode-2.2.5-gpl
Show More
test_admin_permissions.py
45 lines | 1.7 KiB | text/x-python | PythonLexer
/ rhodecode / tests / functional / test_admin_permissions.py
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 from rhodecode.model.db import User, UserIpMap
Refactor codes for scm model...
r691 from rhodecode.tests import *
class TestAdminPermissionsController(TestController):
def test_index(self):
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 self.log_user()
response = self.app.get(url('admin_permissions'))
Refactor codes for scm model...
r691 # Test response...
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 def test_index_ips(self):
self.log_user()
response = self.app.get(url('admin_permissions_ips'))
# Test response...
response.mustcontain('All IP addresses are allowed')
Refactor codes for scm model...
r691
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 def test_add_ips(self):
self.log_user()
default_user_id = User.get_default_user().user_id
response = self.app.put(url('edit_user_ips', id=default_user_id),
params=dict(new_ip='127.0.0.0/24'))
Refactor codes for scm model...
r691
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 response = self.app.get(url('admin_permissions_ips'))
response.mustcontain('127.0.0.0/24')
response.mustcontain('127.0.0.0 - 127.0.0.255')
Refactor codes for scm model...
r691
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 ## delete
default_user_id = User.get_default_user().user_id
del_ip_id = UserIpMap.query().filter(UserIpMap.user_id ==
default_user_id).first().ip_id
Refactor codes for scm model...
r691
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 response = self.app.post(url('edit_user_ips', id=default_user_id),
params=dict(_method='delete',
del_ip_id=del_ip_id))
Refactor codes for scm model...
r691
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 response = self.app.get(url('admin_permissions_ips'))
response.mustcontain('All IP addresses are allowed')
response.mustcontain(no=['127.0.0.0/24'])
response.mustcontain(no=['127.0.0.0 - 127.0.0.255'])
Refactor codes for scm model...
r691
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 def test_index_overview(self):
self.log_user()
response = self.app.get(url('admin_permissions_perms'))
# Test response...