X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_common%2Fdbmemory.py;h=d7419f48d398f2e2ccb97ac62a18b4a0e599b029;hb=22f0fcd7a41bfb43c2f3534e0b557f02217ef50f;hp=cdb048285b5eccac892f849e691e798d2662e4e7;hpb=5c012612f1292b012dc12b337c611c6f3c083b18;p=osm%2Fcommon.git diff --git a/osm_common/dbmemory.py b/osm_common/dbmemory.py index cdb0482..d7419f4 100644 --- a/osm_common/dbmemory.py +++ b/osm_common/dbmemory.py @@ -1,5 +1,5 @@ import logging -from dbbase import DbException, DbBase +from osm_common.dbbase import DbException, DbBase from http import HTTPStatus from uuid import uuid4 from copy import deepcopy @@ -94,7 +94,7 @@ class DbMemory(DbBase): raise DbException("Not found entry with filter='{}'".format(filter), HTTPStatus.NOT_FOUND) return None self.db[table][i] = deepcopy(indata) - return {"upadted": 1} + return {"updated": 1} except Exception as e: # TODO refine raise DbException(str(e)) @@ -114,7 +114,7 @@ class DbMemory(DbBase): if __name__ == '__main__': # some test code - db = dbmemory() + db = DbMemory() db.create("test", {"_id": 1, "data": 1}) db.create("test", {"_id": 2, "data": 2}) db.create("test", {"_id": 3, "data": 3})