Ops... still failing.
======================================================================
FAIL: test_development_env (test_exception.ExceptionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_exception.py", line 98, in
test_development_env
self.assertEquals(msg, resp.get('reason'))
AssertionError: 'Delete is not allowed for root' != u'Delete is not
allowed for kimchiroot'
======================================================================
FAIL: test_production_env (test_exception.ExceptionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_exception.py", line 68, in
test_production_env
self.assertEquals(msg, resp.get('reason'))
AssertionError: 'Delete is not allowed for root' != u'Delete is not
allowed for kimchiroot'
----------------------------------------------------------------------
Ran 136 tests in 115.038s
I will apply the following patch to fix it and apply the whole patch set
diff --git a/tests/test_exception.py b/tests/test_exception.py
index df1f507..b64ab94 100644
--- a/tests/test_exception.py
+++ b/tests/test_exception.py
@@ -63,7 +63,7 @@ class ExceptionTests(unittest.TestCase):
# test 405 wrong method
resp = json.loads(request(host, port, '/', None,
'DELETE').read())
- msg = 'Delete is not allowed for root'
+ msg = 'Delete is not allowed for kimchiroot'
self.assertEquals('405 Method Not Allowed', resp.get('code'))
self.assertEquals(msg, resp.get('reason'))
@@ -93,7 +93,7 @@ class ExceptionTests(unittest.TestCase):
# test 405 wrong method
resp = json.loads(request(host, port, '/', None,
'DELETE').read())
- msg = 'Delete is not allowed for root'
+ msg = 'Delete is not allowed for kimchiroot'
self.assertEquals('405 Method Not Allowed', resp.get('code'))
self.assertEquals(msg, resp.get('reason'))
On 01/30/2014 01:30 AM, Mark Wu wrote:
This series of patches reorganize kimchi's path vars generation
code
to allow plugin use kimchi s ui handler.
Changes:
v5:
Fix the test break on ubuntu because of system paths varies on
different distros (per Aline)
v4:
Fix the test break when installed to non system dirs. (per Shaohe)
v3:
Rebase
Only access the paths instance when the request is for html, which
can avoid forcibly installing paths to the plugin which just have
json requests.
v2:
Rebase
Remove the optimization for plugin paths since it just have a few
instantiations.
Mark Wu (3):
Reorganize the kimchi's paths gereneration code
Add test cases for paths generation code
Allow plugin use kimchi's ui handler
.gitignore | 1 +
src/kimchi/cachebust.py | 4 +-
src/kimchi/config.py.in | 155 +++++++++++++++++++-----------------------------
src/kimchi/root.py | 23 ++++---
src/kimchi/server.py | 14 +++--
src/kimchi/template.py | 17 ++++--
src/kimchi/utils.py | 6 +-
src/kimchid.in | 7 ++-
tests/Makefile.am | 9 ++-
tests/test_config.py.in | 85 ++++++++++++++++++++++++++
10 files changed, 196 insertions(+), 125 deletions(-)
create mode 100644 tests/test_config.py.in