Browse Source

Fixed coverage

pull/12529/head
Nir Schulman 8 months ago
parent
commit
73f56985aa
  1. 3
      docs_src/dependencies/tutorial013c_an_py39.py
  2. 3
      docs_src/dependencies/tutorial013d.py
  3. 3
      docs_src/dependencies/tutorial013d_an_py39.py
  4. 2
      tests/test_tutorial/test_dependencies/test_tutorial013b.py
  5. 2
      tests/test_tutorial/test_dependencies/test_tutorial013b_an_py39.py

3
docs_src/dependencies/tutorial013c_an_py39.py

@ -19,9 +19,6 @@ class MyDatabaseConnection:
async def __aexit__(self, exc_type, exc_val, exc_tb): async def __aexit__(self, exc_type, exc_val, exc_tb):
pass pass
async def get_records(self, table_name: str) -> List[dict]:
pass
async def get_record(self, table_name: str, record_id: str) -> dict: async def get_record(self, table_name: str, record_id: str) -> dict:
pass pass

3
docs_src/dependencies/tutorial013d.py

@ -15,9 +15,6 @@ class MyDatabaseConnection:
async def __aexit__(self, exc_type, exc_val, exc_tb): async def __aexit__(self, exc_type, exc_val, exc_tb):
pass pass
async def get_records(self, table_name: str) -> List[dict]:
pass
async def get_record(self, table_name: str, record_id: str) -> dict: async def get_record(self, table_name: str, record_id: str) -> dict:
pass pass

3
docs_src/dependencies/tutorial013d_an_py39.py

@ -15,9 +15,6 @@ class MyDatabaseConnection:
async def __aexit__(self, exc_type, exc_val, exc_tb): async def __aexit__(self, exc_type, exc_val, exc_tb):
pass pass
async def get_records(self, table_name: str) -> list[dict]:
pass
async def get_record(self, table_name: str, record_id: str) -> dict: async def get_record(self, table_name: str, record_id: str) -> dict:
pass pass

2
tests/test_tutorial/test_dependencies/test_tutorial013b.py

@ -33,7 +33,7 @@ class MockDatabaseConnection:
async def get_record(self, table_name: str, record_id: str) -> dict: async def get_record(self, table_name: str, record_id: str) -> dict:
self.get_record_count += 1 self.get_record_count += 1
# Called for the sake of coverage. # Called for the sake of coverage.
await MyDatabaseConnection.get_records(self, table_name) await MyDatabaseConnection.get_record(self, table_name, record_id)
return { return {
"table_name": table_name, "table_name": table_name,
"record_id": record_id, "record_id": record_id,

2
tests/test_tutorial/test_dependencies/test_tutorial013b_an_py39.py

@ -37,7 +37,7 @@ class MockDatabaseConnection:
async def get_record(self, table_name: str, record_id: str) -> dict: async def get_record(self, table_name: str, record_id: str) -> dict:
self.get_record_count += 1 self.get_record_count += 1
# Called for the sake of coverage. # Called for the sake of coverage.
await MyDatabaseConnection.get_records(self, table_name) await MyDatabaseConnection.get_record(self, table_name, record_id)
return { return {
"table_name": table_name, "table_name": table_name,
"record_id": record_id, "record_id": record_id,

Loading…
Cancel
Save