feat: Support the Count aggregation query#673
Conversation
023213f to
76a3690
Compare
| result = count_query.get() | ||
| assert len(result) == 1 | ||
| for r in result[0]: | ||
| assert r.alias == "total" |
There was a problem hiding this comment.
Looks great. Lines up with what I have here https://github.com/googleapis/python-firestore/pull/673/files.
| assert len(result[0]) == 2 | ||
|
|
||
| for r in result[0]: | ||
| assert r.alias in ["total", "all"] |
There was a problem hiding this comment.
Would it be more precise to do an assert check here that also verifies the order of "total" and "all" in r.alias? Perhaps two assert statements instead of using a loop?
There was a problem hiding this comment.
From my tests, the order of the result has been inconsistent. It doesn't always return it in the order of "total" and then "all".
I've now adjusted this test to assert that:
- there are two elements returned in the result
- the returned result has two values and they are both unique
- the result contains both aliases: "total" and "all"
Test in transaction
29864f6 to
674d242
Compare
kolea2
left a comment
There was a problem hiding this comment.
lgtm to me after header fix and PTAL at last comment.
Would like someone from yoshi-python to review as I've only looked from an API perspective. Thanks!
Refactor system test suite to fallback to default creds
kolea2
left a comment
There was a problem hiding this comment.
lgtm after @googleapis/yoshi-python takes a look as well. Thanks!
| FIRESTORE_CREDS | ||
| ) | ||
| project = FIRESTORE_PROJECT or credentials.project_id | ||
| else: |
There was a problem hiding this comment.
would like someone from @googleapis/yoshi-python to take a look at this specifically
There was a problem hiding this comment.
@kolea2 did anyone from @googleapis/yoshi-python review this? I can't tell from the conversation.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕