|
14 | 14 |
|
15 | 15 | """Test cases for the firebase_admin.dataconnect module.""" |
16 | 16 |
|
17 | | -from unittest import mock |
18 | 17 | from dataclasses import dataclass |
| 18 | +from typing import Any, Dict, Mapping |
| 19 | +from unittest import mock |
| 20 | + |
19 | 21 | from google.auth import credentials as google_auth_credentials |
20 | 22 | import pytest |
21 | 23 |
|
@@ -442,7 +444,6 @@ def test_validate_graphql_options_valid_mapping_variables(self): |
442 | 444 | self.api_client._validate_graphql_options(options) |
443 | 445 |
|
444 | 446 | def test_validate_graphql_options_valid_generic_variables(self): |
445 | | - from typing import Any, Dict, Mapping |
446 | 447 | options = dataconnect.GraphqlOptions(variables={"user_id": "1", "name": "Fred"}) |
447 | 448 | self.api_client._validate_graphql_options(options, Dict[str, Any]) |
448 | 449 | self.api_client._validate_graphql_options(options, Mapping[str, Any]) |
@@ -533,7 +534,6 @@ class CreateUserVariables: |
533 | 534 | self.api_client._validate_graphql_options(options, (list, tuple)) |
534 | 535 |
|
535 | 536 | # Test type mismatch when a dataclass is passed but a Dict is expected |
536 | | - from typing import Dict, Any |
537 | 537 | profile_val = UserProfile(address="123 Road", phone="332-3233-0199") |
538 | 538 | valid_variables = CreateUserVariables( |
539 | 539 | user_id="1", name="Fred", profile=profile_val |
|
0 commit comments