##// END OF EJS Templates
Add javascript for Object Code excanvas (flot) version herein included and use that instead of minified version....
Add javascript for Object Code excanvas (flot) version herein included and use that instead of minified version. I had a bit of trouble finding the upstream on excanvas, as the version from Google, which appears to be the original source, seems unmaintained. However, it appears the version we're carrying in Kallithea is indeed from the excanvas era of flot. $ (cd /tmp; \ svn -r 135 checkout http://flot.googlecode.com/svn/trunk/ flot ) $ cp /tmp/flot/excanvas.js rhodecode/public/js/excanvas.js I also verified the sha256sum of the min file matched ours: $ sha256sum /tmp/flot/excanvas.min.js rhodecode/public/js/excanvas.min.js 5f94b032a110504b7b261eaf71392fa3e8d82cdc6455c0cba5c9f03cd34ed122 /tmp/flot/excanvas.min.js 5f94b032a110504b7b261eaf71392fa3e8d82cdc6455c0cba5c9f03cd34ed122 rhodecode/public/js/excanvas.min.js

File last commit:

r4116:ffd45b18 rhodecode-2.2.5-gpl
r4132:531ab818 rhodecode-2.2.5-gpl
Show More
test_admin_settings.py
179 lines | 7.1 KiB | text/x-python | PythonLexer
fixes #200, rewrote the whole caching mechanism to get rid of such problems. Now cached instances are attached...
r1366 # -*- coding: utf-8 -*-
fixed test that broke admin email address
r754 from rhodecode.lib.auth import get_crypt_password, check_password
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 from rhodecode.model.db import User, RhodeCodeSetting, Repository, RhodeCodeUi
renamed project to rhodecode
r547 from rhodecode.tests import *
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 from rhodecode.tests.fixture import Fixture
Switched forms to new validators
r2467 from rhodecode.lib import helpers as h
Renamed name to firstname in forms...
r2544 from rhodecode.model.user import UserModel
Fixed issue #501 error on setting set_as_fork to same repo...
r2629 from rhodecode.model.scm import ScmModel
synced vcs with upstream...
r3797 from rhodecode.model.meta import Session
Switched forms to new validators
r2467
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 fixture = Fixture()
renamed project to rhodecode
r547
Refactor codes for scm model...
r691 class TestAdminSettingsController(TestController):
renamed project to rhodecode
r547
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 def test_index_main(self):
self.log_user()
renamed project to rhodecode
r547 response = self.app.get(url('admin_settings'))
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 def test_index_mapping(self):
self.log_user()
response = self.app.get(url('admin_settings_mapping'))
def test_index_global(self):
self.log_user()
response = self.app.get(url('admin_settings_global'))
renamed project to rhodecode
r547
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 def test_index_visual(self):
self.log_user()
response = self.app.get(url('admin_settings_visual'))
renamed project to rhodecode
r547
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 def test_index_email(self):
self.log_user()
response = self.app.get(url('admin_settings_email'))
renamed project to rhodecode
r547
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 def test_index_hooks(self):
self.log_user()
response = self.app.get(url('admin_settings_hooks'))
renamed project to rhodecode
r547
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 def test_create_custom_hook(self):
self.log_user()
response = self.app.post(url('admin_settings_hooks'),
params=dict(new_hook_ui_key='test_hooks_1',
new_hook_ui_value='cd /tmp'))
renamed project to rhodecode
r547
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 response = response.follow()
response.mustcontain('test_hooks_1')
response.mustcontain('cd /tmp')
renamed project to rhodecode
r547
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 def test_create_custom_hook_delete(self):
self.log_user()
response = self.app.post(url('admin_settings_hooks'),
params=dict(new_hook_ui_key='test_hooks_2',
new_hook_ui_value='cd /tmp2'))
renamed project to rhodecode
r547
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 response = response.follow()
response.mustcontain('test_hooks_2')
response.mustcontain('cd /tmp2')
renamed project to rhodecode
r547
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 hook_id = RhodeCodeUi.get_by_key('test_hooks_2').ui_id
## delete
self.app.post(url('admin_settings_hooks'),
params=dict(hook_id=hook_id))
response = self.app.get(url('admin_settings_hooks'))
response.mustcontain(no=['test_hooks_2'])
response.mustcontain(no=['cd /tmp2'])
renamed project to rhodecode
r547
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 def test_index_search(self):
self.log_user()
response = self.app.get(url('admin_settings_search'))
renamed project to rhodecode
r547
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 def test_index_system(self):
self.log_user()
response = self.app.get(url('admin_settings_system'))
renamed project to rhodecode
r547
updated tests for application settings
r893 def test_ga_code_active(self):
self.log_user()
old_title = 'RhodeCode'
old_realm = 'RhodeCode authentication'
new_ga_code = 'ga-test-123456789'
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 response = self.app.post(url('admin_settings_global'),
params=dict(rhodecode_title=old_title,
rhodecode_realm=old_realm,
rhodecode_ga_code=new_ga_code,
rhodecode_captcha_private_key='',
rhodecode_captcha_public_key='',
))
updated tests for application settings
r893
Added CheckSessionFlash into init....
r1382 self.checkSessionFlash(response, 'Updated application settings')
refactoring of models names for repoGroup permissions
r1633 self.assertEqual(RhodeCodeSetting
fixes #200, rewrote the whole caching mechanism to get rid of such problems. Now cached instances are attached...
r1366 .get_app_settings()['rhodecode_ga_code'], new_ga_code)
updated tests for application settings
r893
response = response.follow()
Renamed name to firstname in forms...
r2544 response.mustcontain("""_gaq.push(['_setAccount', '%s']);""" % new_ga_code)
updated tests for application settings
r893
def test_ga_code_inactive(self):
self.log_user()
old_title = 'RhodeCode'
old_realm = 'RhodeCode authentication'
new_ga_code = ''
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 response = self.app.post(url('admin_settings_global'),
params=dict(rhodecode_title=old_title,
rhodecode_realm=old_realm,
rhodecode_ga_code=new_ga_code,
rhodecode_captcha_private_key='',
rhodecode_captcha_public_key='',
))
updated tests for application settings
r893
unified flash msg tests
r3640 self.checkSessionFlash(response, 'Updated application settings')
refactoring of models names for repoGroup permissions
r1633 self.assertEqual(RhodeCodeSetting
fixes #200, rewrote the whole caching mechanism to get rid of such problems. Now cached instances are attached...
r1366 .get_app_settings()['rhodecode_ga_code'], new_ga_code)
updated tests for application settings
r893
response = response.follow()
Use only mustcontain for testing response body
r3646 response.mustcontain(no=["_gaq.push(['_setAccount', '%s']);" % new_ga_code])
updated tests for application settings
r893
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 def test_captcha_activate(self):
self.log_user()
old_title = 'RhodeCode'
old_realm = 'RhodeCode authentication'
new_ga_code = ''
response = self.app.post(url('admin_settings_global'),
params=dict(rhodecode_title=old_title,
rhodecode_realm=old_realm,
rhodecode_ga_code=new_ga_code,
rhodecode_captcha_private_key='1234567890',
rhodecode_captcha_public_key='1234567890',
))
self.checkSessionFlash(response, 'Updated application settings')
self.assertEqual(RhodeCodeSetting
.get_app_settings()['rhodecode_captcha_private_key'], '1234567890')
response = self.app.get(url('register'))
response.mustcontain('captcha')
def test_captcha_deactivate(self):
self.log_user()
old_title = 'RhodeCode'
old_realm = 'RhodeCode authentication'
new_ga_code = ''
response = self.app.post(url('admin_settings_global'),
params=dict(rhodecode_title=old_title,
rhodecode_realm=old_realm,
rhodecode_ga_code=new_ga_code,
rhodecode_captcha_private_key='',
rhodecode_captcha_public_key='1234567890',
))
self.checkSessionFlash(response, 'Updated application settings')
self.assertEqual(RhodeCodeSetting
.get_app_settings()['rhodecode_captcha_private_key'], '')
response = self.app.get(url('register'))
response.mustcontain(no=['captcha'])
updated tests for application settings
r893 def test_title_change(self):
self.log_user()
old_title = 'RhodeCode'
new_title = old_title + '_changed'
old_realm = 'RhodeCode authentication'
fixes #200, rewrote the whole caching mechanism to get rid of such problems. Now cached instances are attached...
r1366
for new_title in ['Changed', 'Żółwik', old_title]:
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 response = self.app.post(url('admin_settings_global'),
params=dict(rhodecode_title=new_title,
rhodecode_realm=old_realm,
rhodecode_ga_code='',
rhodecode_captcha_private_key='',
rhodecode_captcha_public_key='',
))
updated tests for application settings
r893
Added CheckSessionFlash into init....
r1382 self.checkSessionFlash(response, 'Updated application settings')
refactoring of models names for repoGroup permissions
r1633 self.assertEqual(RhodeCodeSetting
fixes #200, rewrote the whole caching mechanism to get rid of such problems. Now cached instances are attached...
r1366 .get_app_settings()['rhodecode_title'],
new_title.decode('utf-8'))
updated tests for application settings
r893
fixes #200, rewrote the whole caching mechanism to get rid of such problems. Now cached instances are attached...
r1366 response = response.follow()
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 response.mustcontain("""<div class="branding">- %s</div>""" % new_title)