Skip to content
Snippets Groups Projects
Unverified Commit 686a588f authored by Daniel's avatar Daniel
Browse files

DOC: Added a few docstrings

parent fd2df323
No related branches found
No related tags found
1 merge request!3F fsm
......@@ -32,7 +32,7 @@ def setup_module():
db.Record("State1").add_parent("State").insert()
db.Record("State2").add_parent("State").insert()
db.Record("State3").add_parent("State").insert()
# 1->
# 1->2
db.Record("Transition1").add_parent("Transition").add_property(
"from", "State1").add_property("to", "State2").insert()
# 2->3
......@@ -72,6 +72,7 @@ def setup():
def test_plugin_disabled():
"""Test the behavior when the state machine extension is disabled on the server."""
admin.set_server_property("EXT_ENTITY_STATE", "DISABLED")
rec = db.Record()
......@@ -100,6 +101,7 @@ def test_plugin_disabled():
def test_state_message():
"""State is constant between creation, insertion, retrieval."""
rec = db.Record()
rec.add_parent("TestRT")
rec.state = db.State(model="Model1", name="State1")
......@@ -142,7 +144,7 @@ def test_state_transition():
def test_transition_not_allowed():
"""unallowed transitions return errors and do not update the entity"""
"""Unallowed transitions return errors and do not update the entity."""
rec = db.Record()
rec.add_parent("TestRT")
rec.state = db.State(model="Model1", name="State1")
......@@ -248,7 +250,7 @@ def test_state_not_in_state_model():
0].description == "State does not exist in this StateModel."
def test_transition_with_out_state_change():
def test_transition_without_state_change():
rec = db.Record()
rec.description = "old description"
rec.add_parent("TestRT")
......
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