self = <swh.storage.tests.test_storage.TestStorage object at 0x7f7a5f9b3978>
swh_storage = <swh.storage.validate.ValidatingProxyStorage object at 0x7f7a5f9b33c8>
def test_object_find_by_sha1_git(self, swh_storage):
sha1_gits = [b"00000000000000000000"]
expected = {
b"00000000000000000000": [],
}
swh_storage.content_add([data.cont])
sha1_gits.append(data.cont["sha1_git"])
expected[data.cont["sha1_git"]] = [
{"sha1_git": data.cont["sha1_git"], "type": "content",}
]
swh_storage.directory_add([data.dir])
sha1_gits.append(data.dir["id"])
expected[data.dir["id"]] = [{"sha1_git": data.dir["id"], "type": "directory",}]
> swh_storage.revision_add([data.revision])
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py:3206:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/storage/validate.py:104: in revision_add
[dict_converter(Revision, r) for r in revisions]
.tox/py3/lib/python3.7/site-packages/swh/storage/metrics.py:24: in d
return f(*a, **kw)
.tox/py3/lib/python3.7/site-packages/swh/storage/metrics.py:77: in d
r = f(*a, **kw)
.tox/py3/lib/python3.7/site-packages/swh/core/db/common.py:62: in _meth
return meth(self, *args, db=db, cur=cur, **kwargs)
.tox/py3/lib/python3.7/site-packages/swh/storage/storage.py:579: in revision_add
lambda rev: parents_filtered.extend(rev["parents"]),
.tox/py3/lib/python3.7/site-packages/swh/core/db/__init__.py:213: in copy_to
raise exc_info[1].with_traceback(exc_info[2])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def writer():
nonlocal exc_info
cursor = self.cursor(cur)
with open(read_file, "r") as f:
try:
cursor.copy_expert(
> "COPY %s (%s) FROM STDIN CSV" % (tblname, ", ".join(columns)), f
)
E psycopg2.errors.BadCopyFileFormat: unterminated CSV quoted field
E CONTEXT: COPY tmp_revision, line 1: "\x066b1b62dbfa033362092af468bf6cfabec230e7,"2009-02-13T23:31:30+00:00",120,False,"2005-08-07T23:19:4..."
.tox/py3/lib/python3.7/site-packages/swh/core/db/__init__.py:175: BadCopyFileFormat
TEST RESULT
TEST RESULT
- Run At
- Jul 6 2020, 2:26 PM