-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RDBC-670 RavenDB_14109Test::queryStatsShouldBeFilledBeforeCallingMove…
…Next
- Loading branch information
1 parent
3a7497b
commit ab3ecd1
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
ravendb/tests/jvm_migrated_tests/issues_tests/test_ravenDB_14109.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from ravendb.infrastructure.orders import Company | ||
from ravendb.tests.test_base import TestBase | ||
|
||
|
||
class TestRavenDB14109(TestBase): | ||
def setUp(self): | ||
super(TestRavenDB14109, self).setUp() | ||
|
||
def test_query_stats_should_be_filled_before_calling_move_next(self): | ||
with self.store.open_session() as session: | ||
session.store(Company()) | ||
session.store(Company()) | ||
|
||
session.save_changes() | ||
|
||
with self.store.open_session() as session: | ||
query = session.query(object_type=Company) | ||
|
||
iterator, stats = session.advanced.stream_with_statistics(query) | ||
self.assertEqual(2, stats.total_results) | ||
|
||
count = 0 | ||
for i in iterator: | ||
count += 1 | ||
|
||
self.assertEqual(count, stats.total_results) |