Skip to content

Commit

Permalink
test.backend: Remove outdated tests, fix codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
s-heppner committed Jan 20, 2025
1 parent 791e754 commit e8a4d1f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 deletions.
2 changes: 1 addition & 1 deletion sdk/basyx/aas/examples/tutorial_backend_couchdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@

# Let's delete the Submodels from the CouchDB to leave it in a clean state
object_store.discard(example_submodel1)
object_store.discard(example_submodel2)
object_store.discard(example_submodel2)
2 changes: 1 addition & 1 deletion sdk/basyx/aas/model/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class AbstractObjectStore(AbstractObjectProvider, MutableSet[_IT], Generic[_IT],
:class:`~basyx.aas.model.base.Identifier` – allow to add and delete objects (i.e. behave like a Python set).
This includes local object stores (like :class:`~.DictObjectStore`) and specific object stores
(like :class:`~basyx.aas.backend.couchdb.CouchDBObjectStore` and
:class `~basyx.aas.backend.local_file.LocalFileObjectStore).
:class `~basyx.aas.backend.local_file.LocalFileObjectStore`).
The AbstractObjectStore inherits from the :class:`~collections.abc.MutableSet` abstract collections class and
therefore implements all the functions of this class.
Expand Down
14 changes: 0 additions & 14 deletions sdk/test/backend/test_couchdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,3 @@ def test_key_errors(self) -> None:
self.object_store.discard(retrieved_submodel)
self.assertEqual("'No AAS object with id https://acplt.org/Test_Submodel exists in "
"CouchDB database'", str(cm.exception))

def test_conflict_errors(self):
# Preperation: add object and retrieve it from the database
example_submodel = create_example_submodel()
self.object_store.add(example_submodel)
retrieved_submodel = self.object_store.get_identifiable('https://acplt.org/Test_Submodel')

# Deleting the submodel with safe_delete should or without safe_delete should work
self.object_store.discard(retrieved_submodel, True)
self.assertEqual(0, len(self.object_store))

def test_editing(self):
test_object = create_example_submodel()
self.object_store.add(test_object)
4 changes: 0 additions & 4 deletions sdk/test/backend/test_local_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,3 @@ def test_key_errors(self) -> None:
self.object_store.discard(retrieved_submodel)
self.assertEqual("'No AAS object with id https://acplt.org/Test_Submodel exists in "
"local file database'", str(cm.exception))

def test_editing(self):
test_object = create_example_submodel()
self.object_store.add(test_object)

0 comments on commit e8a4d1f

Please sign in to comment.