Skip to content

Commit

Permalink
tests: Remove unneeded eventually() call for ancestor queries. (#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorced-jim committed Mar 8, 2024
1 parent 47db5b9 commit 98fb176
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/system/test_query.py
Expand Up @@ -156,7 +156,7 @@ class SomeKind(ndb.Model):
foo = ndb.IntegerProperty()

query = SomeKind.query(ancestor=ndb.Key(KIND, root_id))
results = eventually(query.fetch, length_equals(6))
results = query.fetch()

results = sorted(results, key=operator.attrgetter("foo"))
assert [entity.foo for entity in results] == [-1, 0, 1, 2, 3, 4]
Expand All @@ -180,7 +180,7 @@ class Dummy(ndb.Model):

with client_context.new(namespace=other_namespace).use():
query = Dummy.query(ancestor=parent_key, namespace="xyz")
results = eventually(query.fetch, length_equals(2))
results = query.fetch()

assert results[0].foo == "bar"
assert results[1].foo == "child"
Expand All @@ -206,7 +206,7 @@ class Dummy(ndb.Model):

with client_context.new(namespace=other_namespace).use():
query = Dummy.query(ancestor=parent_key, namespace="")
results = eventually(query.fetch, length_equals(2))
results = query.fetch()

assert results[0].foo == "bar"
assert results[1].foo == "child"
Expand Down

0 comments on commit 98fb176

Please sign in to comment.