[test/cleanup] Cleanup flake8 errors in dataimport's test_sqlgenstore
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 19 Apr 2017 10:08:59 +0200
changeset 12169 dfb5ba8518ee
parent 12168 2ff5b8955f3f
child 12170 faacf884777a
[test/cleanup] Cleanup flake8 errors in dataimport's test_sqlgenstore
cubicweb/dataimport/test/test_sqlgenstore.py
flake8-ok-files.txt
--- a/cubicweb/dataimport/test/test_sqlgenstore.py	Wed Apr 19 10:18:47 2017 +0200
+++ b/cubicweb/dataimport/test/test_sqlgenstore.py	Wed Apr 19 10:08:59 2017 +0200
@@ -16,8 +16,6 @@
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 """SQL object store test case"""
 
-import itertools
-
 from cubicweb.dataimport import ucsvreader
 from cubicweb.devtools import testlib, PostgresApptestConfiguration
 from cubicweb.devtools import startpgcluster, stoppgcluster
@@ -48,7 +46,7 @@
         for code, gmt, dst, raw_offset in ucsvreader(open(self.datapath('timeZones.txt'), 'rb'),
                                                      delimiter='\t'):
             cnx.create_entity('TimeZone', code=code, gmt=float(gmt),
-                                    dst=float(dst), raw_offset=float(raw_offset))
+                              dst=float(dst), raw_offset=float(raw_offset))
         timezone_code = dict(cnx.execute('Any C, X WHERE X is TimeZone, X code C'))
         cnx.commit()
         # Push data
@@ -70,12 +68,12 @@
                       'alternatenames': infos[3],
                       'latitude': latitude, 'longitude': longitude,
                       'feature_class': feature_class,
-                      'alternate_country_code':infos[9],
+                      'alternate_country_code': infos[9],
                       'admin_code_3': infos[12],
                       'admin_code_4': infos[13],
                       'population': population, 'elevation': elevation,
                       'gtopo30': gtopo, 'timezone': timezone_code.get(infos[17]),
-                      'cwuri':  u'http://sws.geonames.org/%s/' % int(infos[0]),
+                      'cwuri': u'http://sws.geonames.org/%s/' % int(infos[0]),
                       'geonameid': int(infos[0]),
                       }
             store.prepare_insert_entity('Location', **entity)
--- a/flake8-ok-files.txt	Wed Apr 19 10:18:47 2017 +0200
+++ b/flake8-ok-files.txt	Wed Apr 19 10:08:59 2017 +0200
@@ -9,6 +9,7 @@
 cubicweb/dataimport/test/test_csv.py
 cubicweb/dataimport/test/test_pgstore.py
 cubicweb/dataimport/test/test_massive_store.py
+cubicweb/dataimport/test/test_sqlgenstore.py
 cubicweb/dataimport/test/test_stores.py
 cubicweb/dataimport/test/unittest_importer.py
 cubicweb/devtools/test/data/cubes/i18ntestcube/__init__.py