diff --git a/pyproject.toml b/pyproject.toml index d7b50d2..8bff992 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,9 +23,9 @@ classifiers = [ [tool.poetry.dependencies] python = "^3.6.2" -redis = "^4.1.4" -SQLAlchemy = "1.3.24" -pymongo = "4.0.1" # located here, because it achieves the same goal as sqlalchemy +redis = "^4.2.0" +SQLAlchemy = "1.4.35" +pymongo = "4.1.1" # located here, because it achieves the same goal as sqlalchemy [tool.poetry.dev-dependencies] flake8 = "^3.9.2" @@ -41,7 +41,7 @@ black = "^21.7b0" tox-pyenv = "^1.1.0" PyMySQL = "^1.0.2" cryptography = "^3.4.7" -psycopg2-binary = "^2.9.1" +psycopg2-binary = "^2.9.3" ibm-db = "^3.1.1" ibm-db-sa = "^0.3.7" diff --git a/tests/test_sqlwritebehind.py b/tests/test_sqlwritebehind.py index b80ba16..5e624e6 100644 --- a/tests/test_sqlwritebehind.py +++ b/tests/test_sqlwritebehind.py @@ -47,7 +47,7 @@ def testSimpleWriteBehind(self): count += 1 if count == 10: break - res = result.first() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 22) self.env.execute_command('del', 'person:1') @@ -75,7 +75,7 @@ def testWriteBehindAck(self): assert res[0][1][0][1] == to_utf(['status', 'done']) result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 22) @@ -122,7 +122,7 @@ def testWriteBehindOperations(self): assert res[0][1][0][1] == to_utf(['status', 'done']) result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 22) # delete data without replicate @@ -135,7 +135,7 @@ def testWriteBehindOperations(self): # make sure data is still in the dabase result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 22) # rewrite a hash and not replicate @@ -162,7 +162,7 @@ def testSimpleWriteThrough(self): # make sure data is in the dabase result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 20) assert self.env.execute_command('hgetall', 'person:1') == to_utf({'first_name':'foo', 'last_name': 'bar', 'age': '20'}) @@ -182,7 +182,7 @@ def testSimpleWriteThroughPartialUpdate(self): # make sure data is in the dabase result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 20) assert self.env.execute_command('hgetall', 'person:1') == to_utf({'first_name':'foo', 'last_name': 'bar', 'age': '20'}) @@ -191,7 +191,7 @@ def testSimpleWriteThroughPartialUpdate(self): # make sure data is in the dabase result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo1', 'bar', 20) assert self.env.execute_command('hgetall', 'person:1') == to_utf({'first_name':'foo1', 'last_name': 'bar', 'age': '20'}) @@ -222,7 +222,7 @@ def testDelThroughNoReplicate(self): # make sure data is in the dabase result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 20) assert self.env.execute_command('hgetall', 'person:1') == to_utf({'first_name':'foo', 'last_name': 'bar', 'age': '20'}) @@ -232,7 +232,7 @@ def testDelThroughNoReplicate(self): # make sure data was deleted from redis but not from the target assert self.env.execute_command('hgetall', 'person:1') == {} result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 20) @@ -252,7 +252,7 @@ def testWriteTroughAckStream(self): # make sure data is in the dabase result = self.dbconn.execute(text('select * from persons')) - res = result.next() + res = result.fetchone() assert res == ('1', 'foo', 'bar', 20) # make sure data is in redis