Make sqlalchemy stop complaining about non-unicode input
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Tue, 11 Dec 2012 15:55:11 +0000 (16:55 +0100)
committerSebastian Spaeth <Sebastian@SSpaeth.de>
Tue, 11 Dec 2012 15:55:11 +0000 (16:55 +0100)
These tests output noisy sql complaints about receiving non-unicode
for an unicode field. This was ... well ... because we were handing
in non-unicode usernames and passwords.

Prefixing usernames/passwords with u'' makes the testsuite less noisy
and verbose.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
mediagoblin/tests/test_http_callback.py
mediagoblin/tests/test_oauth.py

index d769af1e4062affd268e1198a812be8e85312416..8b0a03b973e612d23a07e0a429458abb1195a7e8 100644 (file)
@@ -30,8 +30,8 @@ class TestHTTPCallback(object):
         self.app = get_test_app()
         self.db = mg_globals.database
 
-        self.user_password = 'secret'
-        self.user = fixture_add_user('call_back', self.user_password)
+        self.user_password = u'secret'
+        self.user = fixture_add_user(u'call_back', self.user_password)
 
         self.login()
 
index db4e226a6191d58cbbb44a7cb49f7607cca92352..cedfc42aa47aa46cf1cef1dd22265eea3b9b019d 100644 (file)
@@ -34,8 +34,8 @@ class TestOAuth(object):
 
         self.pman = pluginapi.PluginManager()
 
-        self.user_password = '4cc355_70k3N'
-        self.user = fixture_add_user('joauth', self.user_password)
+        self.user_password = u'4cc355_70k3N'
+        self.user = fixture_add_user(u'joauth', self.user_password)
 
         self.login()