@@ -29,7 +29,7 @@ async def base_dataset(
2929 cat_bella ,
3030 dog_daisy ,
3131 dog_rocky ,
32- ):
32+ ) -> None :
3333 await client .branch .create (branch_name = "branch01" )
3434
3535 @pytest .fixture
@@ -39,7 +39,7 @@ async def set_pagination_size3(self, client: InfrahubClient):
3939 yield
4040 client .pagination_size = original_pagination_size
4141
42- async def test_query_branches (self , client : InfrahubClient , base_dataset ):
42+ async def test_query_branches (self , client : InfrahubClient , base_dataset ) -> None :
4343 branches = await client .branch .all ()
4444 main = await client .branch .get (branch_name = "main" )
4545
@@ -50,7 +50,7 @@ async def test_query_branches(self, client: InfrahubClient, base_dataset):
5050 assert "main" in branches
5151 assert "branch01" in branches
5252
53- async def test_branch_delete (self , client : InfrahubClient , base_dataset ):
53+ async def test_branch_delete (self , client : InfrahubClient , base_dataset ) -> None :
5454 async_branch = "async-delete-branch"
5555 await client .branch .create (branch_name = async_branch )
5656 pre_delete = await client .branch .all ()
@@ -59,7 +59,7 @@ async def test_branch_delete(self, client: InfrahubClient, base_dataset):
5959 assert async_branch in pre_delete .keys ()
6060 assert async_branch not in post_delete .keys ()
6161
62- async def test_get_all (self , client : InfrahubClient , base_dataset ):
62+ async def test_get_all (self , client : InfrahubClient , base_dataset ) -> None :
6363 nodes = await client .all (kind = TESTING_CAT )
6464 assert len (nodes ) == 2
6565 assert isinstance (nodes [0 ], InfrahubNode )
@@ -80,7 +80,7 @@ async def test_get_all(self, client: InfrahubClient, base_dataset):
8080 # assert isinstance(nodes[0], InfrahubNode)
8181 # assert {node.name.value for node in nodes} == {"Bella", "Luna"}
8282
83- async def test_get_one (self , client : InfrahubClient , base_dataset , cat_luna , person_sophia ):
83+ async def test_get_one (self , client : InfrahubClient , base_dataset , cat_luna , person_sophia ) -> None :
8484 node1 = await client .get (kind = TESTING_CAT , id = cat_luna .id )
8585 assert isinstance (node1 , InfrahubNode )
8686 assert node1 .name .value == "Luna"
@@ -89,7 +89,7 @@ async def test_get_one(self, client: InfrahubClient, base_dataset, cat_luna, per
8989 assert isinstance (node2 , InfrahubNode )
9090 assert node2 .name .value == "Sophia Walker"
9191
92- async def test_filters_partial_match (self , client : InfrahubClient , base_dataset ):
92+ async def test_filters_partial_match (self , client : InfrahubClient , base_dataset ) -> None :
9393 nodes = await client .filters (kind = TESTING_PERSON , name__value = "Walker" )
9494 assert not nodes
9595
@@ -98,25 +98,25 @@ async def test_filters_partial_match(self, client: InfrahubClient, base_dataset)
9898 assert isinstance (nodes [0 ], InfrahubNode )
9999 assert sorted ([node .name .value for node in nodes ]) == ["Liam Walker" , "Sophia Walker" ]
100100
101- async def test_get_generic (self , client : InfrahubClient , base_dataset ):
101+ async def test_get_generic (self , client : InfrahubClient , base_dataset ) -> None :
102102 nodes = await client .all (kind = TESTING_ANIMAL )
103103 assert len (nodes ) == 4
104104
105- async def test_get_generic_fragment (self , client : InfrahubClient , base_dataset ):
105+ async def test_get_generic_fragment (self , client : InfrahubClient , base_dataset ) -> None :
106106 nodes = await client .all (kind = TESTING_ANIMAL , fragment = True )
107107 assert len (nodes )
108108 assert nodes [0 ].typename in [TESTING_DOG , TESTING_CAT ]
109109 assert nodes [0 ].breed .value is not None
110110
111- async def test_get_related_nodes (self , client : InfrahubClient , base_dataset , person_ethan ):
111+ async def test_get_related_nodes (self , client : InfrahubClient , base_dataset , person_ethan ) -> None :
112112 ethan = await client .get (kind = TESTING_PERSON , id = person_ethan .id )
113113 assert ethan
114114
115115 assert ethan .animals .peers == []
116116 await ethan .animals .fetch ()
117117 assert len (ethan .animals .peers ) == 3
118118
119- async def test_profile (self , client : InfrahubClient , base_dataset , person_liam ):
119+ async def test_profile (self , client : InfrahubClient , base_dataset , person_liam ) -> None :
120120 profile_schema_kind = f"Profile{ TESTING_DOG } "
121121 profile_schema = await client .schema .get (kind = profile_schema_kind )
122122 assert isinstance (profile_schema , ProfileSchemaAPI )
@@ -137,30 +137,30 @@ async def test_profile(self, client: InfrahubClient, base_dataset, person_liam):
137137 obj1 = await client .get (kind = TESTING_DOG , id = obj .id )
138138 assert obj1 .color .value == "#111111"
139139
140- async def test_create_branch (self , client : InfrahubClient , base_dataset ):
140+ async def test_create_branch (self , client : InfrahubClient , base_dataset ) -> None :
141141 branch = await client .branch .create (branch_name = "new-branch-1" )
142142 assert isinstance (branch , BranchData )
143143 assert branch .id is not None
144144
145- async def test_create_branch_async (self , client : InfrahubClient , base_dataset ):
145+ async def test_create_branch_async (self , client : InfrahubClient , base_dataset ) -> None :
146146 task_id = await client .branch .create (branch_name = "new-branch-2" , wait_until_completion = False )
147147 assert isinstance (task_id , str )
148148
149- async def test_count (self , client : InfrahubClient , base_dataset ):
149+ async def test_count (self , client : InfrahubClient , base_dataset ) -> None :
150150 count = await client .count (kind = TESTING_PERSON )
151151 assert count == 3
152152
153- async def test_count_with_filter (self , client : InfrahubClient , base_dataset ):
153+ async def test_count_with_filter (self , client : InfrahubClient , base_dataset ) -> None :
154154 count = await client .count (kind = TESTING_PERSON , name__values = ["Liam Walker" , "Ethan Carter" ])
155155 assert count == 2
156156
157- async def test_query_unexisting_branch (self , client : InfrahubClient ):
157+ async def test_query_unexisting_branch (self , client : InfrahubClient ) -> None :
158158 with pytest .raises (URLNotFoundError , match = r"/graphql/unexisting` not found." ):
159159 await client .execute_graphql (query = "unused" , branch_name = "unexisting" )
160160
161161 async def test_create_generic_rel_with_hfid (
162162 self , client : InfrahubClient , base_dataset , cat_luna , person_sophia , schema_animal , schema_cat
163- ):
163+ ) -> None :
164164 # See https://github.com/opsmill/infrahub-sdk-python/issues/277
165165 assert schema_animal .human_friendly_id != schema_cat .human_friendly_id , (
166166 "Inherited node schema should have a different hfid than generic one for this test to be relevant"
@@ -170,7 +170,7 @@ async def test_create_generic_rel_with_hfid(
170170 person_sophia = await client .get (kind = TESTING_PERSON , id = person_sophia .id , prefetch_relationships = True )
171171 assert person_sophia .favorite_animal .id == cat_luna .id
172172
173- async def test_task_query (self , client : InfrahubClient , base_dataset , set_pagination_size3 ):
173+ async def test_task_query (self , client : InfrahubClient , base_dataset , set_pagination_size3 ) -> None :
174174 nbr_tasks = await client .task .count ()
175175 assert nbr_tasks
176176
0 commit comments