From 3a3fac16b867b94a865e35abdd551836208b4466 Mon Sep 17 00:00:00 2001
From: Timm Fitschen <t.fitschen@indiscale.com>
Date: Tue, 30 Mar 2021 21:20:39 +0200
Subject: [PATCH] STY: autopep8'ed test_state and test_affiliation

---
 tests/test_affiliation.py |  1 -
 tests/test_state.py       | 13 +++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/test_affiliation.py b/tests/test_affiliation.py
index bdd73d1..70a619c 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 a096cbe..bbe5173 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
-- 
GitLab