Skip to content
Snippets Groups Projects
Commit b785f143 authored by florian's avatar florian
Browse files

WIP: Update tickets 39 and 128

parent 3c4b23c7
No related branches found
No related tags found
No related merge requests found
......@@ -584,7 +584,7 @@ def test_ticket_39():
scratch = os.path.realpath(db.get_config().get(
"EndToEndTests", "test_tickets.test_ticket_39.scratch"))
assert_true(os.path.isdir(scratch))
assert os.path.isdir(scratch)
testfile = os.path.join(scratch, "test.dat")
try:
# insert RecordType
......@@ -595,19 +595,16 @@ def test_ticket_39():
# check if the server can connect to this filesystem
f = db.File(path="testfiles/file1", pickup=testfile).insert()
assert_true(f.is_valid())
assert f.is_valid()
f.delete()
# make unreadable
os.chmod(testfile, 0o000)
try:
with pytest.raises(TransactionError) as te:
f = db.File(
path="testfiles/file1", pickup=testfile).insert()
except EntityError as e:
assert_equal(
"Insufficient read permission for this file. "
"Please make it readable.",
e.msg)
e = te.value.get_errors()[0]
assert e.msg == "Insufficient read permission for this file. Please make it readable."
finally:
os.chmod(testfile, 0o600)
......@@ -625,7 +622,7 @@ def test_ticket_128():
try:
db.execute_query(r"FIND 5\#):xw;;-`;BY6~PjsI^*g.$+eY#n.aA9zm")
except TransactionError as e:
assert_equal(13, int(e.get_error().code))
assert 13 == int(e.get_error().code)
def test_ticket_123a():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment