Commit 04195013 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

pep8

parent 312a9055f0a6
......@@ -20,7 +20,6 @@ from yams.buildobjs import (EntityType, RelationDefinition, ComputedRelation,
from cubicweb.schema import RQLConstraint, RRQLExpression
_ = unicode
......
......@@ -125,7 +125,7 @@ def _skos_import_lcsv(cnx, stream, import_log, scheme_uri, delimiter,
graph = rdfio.RDFLibRDFGraph()
# add LCSV statements to the RDF graph
lcsv2rdf = lcsv.LCSV2RDF(stream, delimiter, encoding, default_lang=language_code,
uri_cls=graph.uri, uri_generator=lambda x: str(uuid4())+x)
uri_cls=graph.uri, uri_generator=lambda x: str(uuid4()) + x)
for (subj, pred, obj) in lcsv2rdf.triples():
graph.add(subj, pred, obj)
......
......@@ -24,7 +24,8 @@ class HooksTC(CubicWebTC):
def test_externaluri_to_concept(self):
with self.admin_access.repo_cnx() as cnx:
scheme = cnx.create_entity('ConceptScheme', title=u'preexisting')
concept = scheme.add_concept(u'something', cwuri=u'http://data.bnf.fr/ark:/12148/cb11934798x')
concept = scheme.add_concept(u'something',
cwuri=u'http://data.bnf.fr/ark:/12148/cb11934798x')
exturi = cnx.create_entity('ExternalUri', cwuri=u'http://someuri/someobject',
uri=u'http://someuri/someobject',
exact_match=concept)
......@@ -40,7 +41,8 @@ class HooksTC(CubicWebTC):
def test_skos_source(self):
with self.admin_access.repo_cnx() as cnx:
skos = cnx.create_entity('SKOSSource', name=u'a source', url=u'http://skos.org\nhttp://skos.net')
skos = cnx.create_entity('SKOSSource', name=u'a source',
url=u'http://skos.org\nhttp://skos.net')
cnx.commit()
source = cnx.find('CWSource', name=u'a source').one()
self.assertEqual(source.url, u'http://skos.org\nhttp://skos.net')
......
......@@ -13,7 +13,6 @@
#
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
"""cubicweb-skos sobjects tests"""
from cubicweb import Unauthorized
......
......@@ -23,7 +23,8 @@ class DumpRelationsTC(CubicWebTC):
from cubes.skos.sobjects import dump_relations
with self.admin_access.client_cnx() as cnx:
scheme = cnx.create_entity('ConceptScheme', title=u'preexisting')
concept = scheme.add_concept(u'something', cwuri=u'http://data.bnf.fr/ark:/12148/cb11934798x')
concept = scheme.add_concept(u'something',
cwuri=u'http://data.bnf.fr/ark:/12148/cb11934798x')
cnx.commit()
self.assertEqual(dump_relations(cnx, scheme.eid, 'ConceptScheme'),
[(concept.eid, 'in_scheme', None)])
......
......@@ -94,7 +94,7 @@ class ViewsTC(CubicWebTC):
fobj.write(scheme.view(vid))
fobj.close()
graph = default_graph()
graph.load('file://'+fobj.name, rdf_format='xml')
graph.load('file://' + fobj.name, rdf_format='xml')
finally:
os.unlink(fobj.name)
triples = set(graph.triples())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment