Skip to content

Commit 5e10260

Browse files
committed
PYTHON-336 test tweaks and changelog
1 parent 94fe1fc commit 5e10260

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Features
66
* Pass name of server auth class to AuthProvider (PYTHON-454)
77
* Surface schema agreed flag for DDL statements (PYTHON-458)
88
* Automatically convert float and int to Decimal on serialization (PYTHON-468)
9+
* Expose prior state information via cqlengine LWTException (github #343)
910

1011
Bug Fixes
1112
---------

docs/api/cassandra/cqlengine/models.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Model
9696
TestIfNotExistsModel.if_not_exists().create(id=id, count=9, text='111111111111')
9797
except LWTException as e:
9898
# handle failure case
99-
print e.existing # existing object
99+
print e.existing # dict containing LWT result fields
100100
101101
This method is supported on Cassandra 2.0 or later.
102102

tests/integration/cqlengine/test_ifnotexists.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_insert_if_not_exists_success(self):
8585
with self.assertRaises(LWTException) as assertion:
8686
TestIfNotExistsModel.if_not_exists().create(id=id, count=9, text='111111111111')
8787

88-
self.assertEquals(assertion.exception.existing, {
88+
self.assertEqual(assertion.exception.existing, {
8989
'count': 8,
9090
'id': id,
9191
'text': '123456789',
@@ -128,7 +128,7 @@ def test_batch_insert_if_not_exists_success(self):
128128
with self.assertRaises(LWTException) as assertion:
129129
b.execute()
130130

131-
self.assertEquals(assertion.exception.existing, {
131+
self.assertEqual(assertion.exception.existing, {
132132
'count': 8,
133133
'id': id,
134134
'text': '123456789',

0 commit comments

Comments
 (0)