diff --git a/tests/test_affiliation.py b/tests/test_affiliation.py index bdd73d117488ceb09210fdcdc0a92ba3b0794c3e..70a619c5662fa6afb0e4bf949afae720322ecbd2 100644 --- a/tests/test_affiliation.py +++ b/tests/test_affiliation.py @@ -65,7 +65,6 @@ def teardown(): def test_affiliation_there(): par = db.RecordType(name="TestRT1") ch = db.Record(name="TestRec").add_parent(par) - print(ch) assert_is_not_none(ch.get_parent("TestRT1")) assert_true(hasattr(ch.get_parent("TestRT1"), "affiliation")) diff --git a/tests/test_state.py b/tests/test_state.py index a096cbe1e676de3e815b427b7d9b8237d626841c..bbe517378403ddf97c5a898a656a20ddc9bdfa28 100644 --- a/tests/test_state.py +++ b/tests/test_state.py @@ -713,7 +713,7 @@ def test_unauthorized_final(): switch_to_test_user("normal") rec.state = None with pytest.raises(db.TransactionError) as exc: - rec.update(sync = False) + rec.update(sync=False) assert "You are not allowed to do this." in str(exc.value) rec_retrieve = db.Record(id=rec.id).retrieve() @@ -736,7 +736,7 @@ def test_unauthorized_initial(): rec.state = db.State(model="Model1", name="State1") with pytest.raises(db.TransactionError) as exc: # normal user lacks the permission for the initial state - rec.update(sync = False) + rec.update(sync=False) assert "You are not allowed to do this." in str(exc.value) rec_retrieve = db.Record(id=rec.id).retrieve() assert rec_retrieve.state is None @@ -744,7 +744,7 @@ def test_unauthorized_initial(): switch_to_test_user("team-leader") with pytest.raises(db.TransactionError) as exc: # it is not allowed to "steal" the entity with the state feature - rec.update(sync = False) + rec.update(sync=False) assert "You are not allowed to do this." in str(exc.value) rec_retrieve = db.Record(id=rec.id).retrieve() assert rec_retrieve.state is None @@ -757,13 +757,15 @@ def test_unauthorized_initial(): rec_update.update_acl() switch_to_test_user("team-leader") - rec.update(sync = False) + rec.update(sync=False) assert rec.state == db.State(model="Model1", name="State1") rec_retrieve = db.Record(id=rec.id).retrieve() assert rec_retrieve.state == db.State(model="Model1", name="State1") -@pytest.mark.xfail(reason="This is a very special corner case bug with low severity") + +@pytest.mark.xfail( + reason="This is a very special corner case bug with low severity") def test_transitions_included_after_empty_update(): rec = db.Record() rec.description = "old description" @@ -787,7 +789,6 @@ def test_transitions_included_after_empty_update(): from_state="State2", to_state="State2")} - rec_update_2 = rec_update.update(sync=False) # this fails