Skip to content

Commit 2ffa1b2

Browse files
CagriYoncapvital
authored andcommitted
updated assert condition
1 parent 02d8a92 commit 2ffa1b2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/clients/test_cassandra-driver.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import pytest
99
from cassandra import ConsistencyLevel
10-
from cassandra.cluster import Cluster
10+
from cassandra.cluster import Cluster, ResultSet
1111
from cassandra.query import SimpleStatement
1212

1313
from instana.singletons import agent, tracer
@@ -43,7 +43,7 @@ def _resource(self) -> Generator[None, None, None]:
4343
def test_untraced_execute(self) -> None:
4444
res = session.execute("SELECT name, age, email FROM users")
4545

46-
assert res
46+
assert isinstance(res, ResultSet)
4747

4848
time.sleep(0.5)
4949

@@ -69,7 +69,7 @@ def test_execute(self) -> None:
6969
with tracer.start_as_current_span("test"):
7070
res = session.execute("SELECT name, age, email FROM users")
7171

72-
assert res
72+
assert isinstance(res, ResultSet)
7373

7474
time.sleep(0.5)
7575

@@ -101,7 +101,7 @@ def test_execute_as_root_exit_span(self) -> None:
101101
agent.options.allow_exit_as_root = True
102102
res = session.execute("SELECT name, age, email FROM users")
103103

104-
assert res
104+
assert isinstance(res, ResultSet)
105105

106106
time.sleep(0.5)
107107

@@ -128,7 +128,7 @@ def test_execute_async(self) -> None:
128128
with tracer.start_as_current_span("test"):
129129
res = session.execute_async("SELECT name, age, email FROM users").result()
130130

131-
assert res
131+
assert isinstance(res, ResultSet)
132132

133133
time.sleep(0.5)
134134

@@ -164,7 +164,7 @@ def test_simple_statement(self) -> None:
164164
)
165165
res = session.execute(query)
166166

167-
assert res
167+
assert isinstance(res, ResultSet)
168168

169169
time.sleep(0.5)
170170

0 commit comments

Comments
 (0)