small fixes and use iro as dbname for testing. devel
authorSandro Knauß <knauss@netzguerilla.net>
Thu, 27 Sep 2012 14:13:06 +0200
branchdevel
changeset 295 dc3cc61c7f6f
parent 294 0e75bd39767d
child 296 a73bbc1d8b4b
small fixes and use iro as dbname for testing.
iro/controller/viewinterface.py
iro/offer/smstrade.py
iro/test_helpers/dbtestcase.py
--- a/iro/controller/viewinterface.py	Fri Aug 24 01:05:06 2012 +0200
+++ b/iro/controller/viewinterface.py	Thu Sep 27 14:13:06 2012 +0200
@@ -58,7 +58,7 @@
         user = session.merge(user)
         ret={}
         if not id:
-            for job in  user.jobs:
+            for job in user.jobs:
                 ret[str(job.id)]={"status":job.status}
         else:
             ret[str(id)]={"status":user.job(id).status}
--- a/iro/offer/smstrade.py	Fri Aug 24 01:05:06 2012 +0200
+++ b/iro/offer/smstrade.py	Thu Sep 27 14:13:06 2012 +0200
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
 # Copyright (c) 2012 netzguerilla.net <iro@netzguerilla.net>
 # 
 # This file is part of Iro.
@@ -19,7 +21,6 @@
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-# -*- coding: utf-8 -*-
 
 import urllib
 from functools import partial
--- a/iro/test_helpers/dbtestcase.py	Fri Aug 24 01:05:06 2012 +0200
+++ b/iro/test_helpers/dbtestcase.py	Thu Sep 27 14:13:06 2012 +0200
@@ -81,8 +81,8 @@
     def create(self):
         self.tdir = mkdtemp(prefix='iro-mysql-')
         self.server = Server('%s/my.cnf'%self.tdir)
-        self.db = SampleDatabase("test","test",'%s/my.cnf'%self.tdir)
-        self.dburl = 'mysql://test:test@localhost/test?unix_socket=%s/socket'%self.tdir
+        self.db = SampleDatabase("iro","test",'%s/my.cnf'%self.tdir)
+        self.dburl = 'mysql://test:test@localhost/iro?unix_socket=%s/socket'%self.tdir
         self.engine = create_engine(self.dburl, 
                 poolclass = pool.SingletonThreadPool,  pool_size=dbPool.maxthreads, )#echo=True)
         self.valid = False