diff --git a/Tests/README b/Tests/README index 6515463f2..db62e4ed4 100644 --- a/Tests/README +++ b/Tests/README @@ -1,8 +1,8 @@ setup ----- -(you need "python-xml", "python-vobject" and "python-m2crypto" in order to run - the scripts on Debian) +(you need "python-simplejson", "python-xml", "python-vobject" and "python-m2crypto" + in order to run the scripts on Debian) 1) copy config.py.in to config.py (make sure to never EVER add it to monotone) 2) edit config.py to suit your environment diff --git a/Tests/preferences.py b/Tests/preferences.py index cb9c5ac6a..d29ec7293 100644 --- a/Tests/preferences.py +++ b/Tests/preferences.py @@ -2,6 +2,7 @@ from config import hostname, port, username, password import webdavlib import urllib import base64 +import simplejson class HTTPPreferencesPOST (webdavlib.HTTPPOST): @@ -22,8 +23,6 @@ class HTTPPreferencesGET (webdavlib.HTTPGET): headers["Cookie"] = self.cookie return headers - - class preferences: login = username passw = password @@ -64,7 +63,7 @@ class preferences: get = HTTPPreferencesGET (url) get.cookie = self.cookie self.client.execute (get) - content = eval (get.response['body']) + content = simplejson.loads(get.response['body']) result = None try: result = content[preference] @@ -72,7 +71,6 @@ class preferences: pass return result - # Simple main to test this class if __name__ == "__main__": p = preferences ()