Skip to content
Snippets Groups Projects
Verified Commit a29e1609 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

TST: fix tests

parent b39d25ac
No related branches found
No related tags found
No related merge requests found
Pipeline #48910 failed
......@@ -34,7 +34,7 @@ should not be executable for non-admin users.
import sys
TEST_MODULES = [
"caosdb",
"linkahead",
"numpy",
"pandas",
"validate_email"
......@@ -73,8 +73,8 @@ def get_query():
return get_option("query")
def get_caosdb_info(auth_token):
import caosdb as db
def get_linkahead_info(auth_token):
import linkahead as db
result = dict()
result["version"] = db.version.version
......@@ -136,8 +136,8 @@ def main():
auth_token = get_auth_token()
diagnostics["auth_token"] = auth_token
if diagnostics["import"]["caosdb"][0] is True:
diagnostics["caosdb"] = get_caosdb_info(auth_token)
if diagnostics["import"]["linkahead"][0] is True:
diagnostics["linkahead"] = get_linkahead_info(auth_token)
finally:
json.dump(diagnostics, sys.stdout)
......
......@@ -3,7 +3,6 @@ package org.caosdb.server.resource.transaction;
import java.util.List;
import org.caosdb.server.entity.DeleteEntity;
import org.caosdb.server.entity.EntityID;
import org.caosdb.server.entity.UpdateEntity;
import org.caosdb.server.entity.container.WritableContainer;
import org.caosdb.server.transaction.WriteTransaction;
import org.caosdb.server.transaction.WriteTransactionInterface;
......@@ -33,15 +32,15 @@ public class DeleteEntityResource extends EntityResource {
new WritableContainer(getUser(), getTimestamp(), getSRID(), getFlags());
final Document doc = new Document();
List<Element> updateEntities;
updateEntities = parseEntity(getRequest().getEntity()).getRootElement().getChildren();
List<Element> deleteEntities;
deleteEntities = parseEntity(getRequest().getEntity()).getRootElement().getChildren();
for (final Element e : updateEntities) {
entityContainer.add(new DeleteEntity(new EntityID(new UpdateEntity(e).getId().toString())));
for (final Element e : deleteEntities) {
entityContainer.add(new DeleteEntity(new EntityID(e.getAttributeValue("id"))));
}
final WriteTransactionInterface update = new WriteTransaction(entityContainer);
update.execute();
final WriteTransactionInterface transaction = new WriteTransaction(entityContainer);
transaction.execute();
final Element rootElem = generateRootElement();
entityContainer.addToElement(rootElem);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment