From 4fafdfd8487ddf61105b2a5ca92534c8014c1db4 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 20 Sep 2022 21:50:34 +0300 Subject: Use member variable `self.conn` to avoid test failure Use the `self.conn` variable to prevent test from failing. --- wqflask/base/species.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wqflask/base') diff --git a/wqflask/base/species.py b/wqflask/base/species.py index 0ee04630..403e0bbb 100644 --- a/wqflask/base/species.py +++ b/wqflask/base/species.py @@ -47,7 +47,7 @@ class Chromosomes: def chromosomes(self) -> OrderedDict: """Lazily fetch the chromosomes""" chromosomes = OrderedDict() - with database_connection() as conn, conn.cursor() as cursor: + with self.conn.cursor() as cursor: if self.species is not None: cursor.execute( "SELECT Chr_Length.Name, Chr_Length.OrderId, Length " -- cgit v1.2.3