about summary refs log tree commit diff
path: root/tests/unit/db
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-09-23 03:45:19 +0300
committerFrederick Muriuki Muriithi2021-09-23 03:45:19 +0300
commit95c5c0e73bffbf0287a17309e703063ee54d25ba (patch)
tree23c3197072d19f4aa9bbb80023ca31780235207b /tests/unit/db
parent56c73324c285d896567268370f3955bbd15754b0 (diff)
downloadgenenetwork3-95c5c0e73bffbf0287a17309e703063ee54d25ba.tar.gz
Refactor: Move common sample data to separate file
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi

* Move common sample test data into a separate file where it can be imported
  from, to prevent pylint error R0801 which proved tricky to silence in any
  other way.
Diffstat (limited to 'tests/unit/db')
-rw-r--r--tests/unit/db/test_traits.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/unit/db/test_traits.py b/tests/unit/db/test_traits.py
index baa2af3..8af8e82 100644
--- a/tests/unit/db/test_traits.py
+++ b/tests/unit/db/test_traits.py
@@ -170,12 +170,15 @@ class TestTraitsDBFunctions(TestCase):
         db_mock = mock.MagicMock()
 
         STRAIN_ID_SQL: str = "UPDATE Strain SET Name = %s WHERE Id = %s"
-        PUBLISH_DATA_SQL: str = ("UPDATE PublishData SET value = %s "
-                                 "WHERE StrainId = %s AND Id = %s")
-        PUBLISH_SE_SQL: str = ("UPDATE PublishSE SET error = %s "
-                               "WHERE StrainId = %s AND DataId = %s")
-        N_STRAIN_SQL: str = ("UPDATE NStrain SET count = %s "
-                             "WHERE StrainId = %s AND DataId = %s")
+        PUBLISH_DATA_SQL: str = (
+            "UPDATE PublishData SET value = %s "
+            "WHERE StrainId = %s AND Id = %s")
+        PUBLISH_SE_SQL: str = (
+            "UPDATE PublishSE SET error = %s "
+            "WHERE StrainId = %s AND DataId = %s")
+        N_STRAIN_SQL: str = (
+            "UPDATE NStrain SET count = %s "
+            "WHERE StrainId = %s AND DataId = %s")
 
         with db_mock.cursor() as cursor:
             type(cursor).rowcount = 1