@@ -127,8 +127,8 @@ def repository_id():
127
127
128
128
129
129
@pytest .fixture
130
- def get_mock_github_api ():
131
- def _get_mock_github_api (return_data , installation_id = 12345 ):
130
+ def aget_mock_github_api ():
131
+ def _aget_mock_github_api (return_data , installation_id = 12345 ):
132
132
mock_api = AsyncMock (spec = AsyncGitHubAPI )
133
133
134
134
async def mock_getitem (* args , ** kwargs ):
@@ -146,12 +146,12 @@ async def mock_getiter(*args, **kwargs):
146
146
147
147
return mock_api
148
148
149
- return _get_mock_github_api
149
+ return _aget_mock_github_api
150
150
151
151
152
152
@pytest .fixture
153
- def get_mock_github_api_sync ():
154
- def _get_mock_github_api_sync (return_data , installation_id = 12345 ):
153
+ def get_mock_github_api ():
154
+ def _get_mock_github_api (return_data , installation_id = 12345 ):
155
155
from django_github_app .github import SyncGitHubAPI
156
156
157
157
mock_api = MagicMock (spec = SyncGitHubAPI )
@@ -172,15 +172,15 @@ def mock_post(*args, **kwargs):
172
172
173
173
return mock_api
174
174
175
- return _get_mock_github_api_sync
175
+ return _get_mock_github_api
176
176
177
177
178
178
@pytest .fixture
179
- def installation (get_mock_github_api , baker ):
179
+ def installation (aget_mock_github_api , baker ):
180
180
installation = baker .make (
181
181
"django_github_app.Installation" , installation_id = seq .next ()
182
182
)
183
- mock_github_api = get_mock_github_api (
183
+ mock_github_api = aget_mock_github_api (
184
184
[
185
185
{"id" : seq .next (), "node_id" : "node1" , "full_name" : "owner/repo1" },
186
186
{"id" : seq .next (), "node_id" : "node2" , "full_name" : "owner/repo2" },
@@ -192,11 +192,11 @@ def installation(get_mock_github_api, baker):
192
192
193
193
194
194
@pytest_asyncio .fixture
195
- async def ainstallation (get_mock_github_api , baker ):
195
+ async def ainstallation (aget_mock_github_api , baker ):
196
196
installation = await sync_to_async (baker .make )(
197
197
"django_github_app.Installation" , installation_id = seq .next ()
198
198
)
199
- mock_github_api = get_mock_github_api (
199
+ mock_github_api = aget_mock_github_api (
200
200
[
201
201
{"id" : seq .next (), "node_id" : "node1" , "full_name" : "owner/repo1" },
202
202
{"id" : seq .next (), "node_id" : "node2" , "full_name" : "owner/repo2" },
@@ -208,14 +208,14 @@ async def ainstallation(get_mock_github_api, baker):
208
208
209
209
210
210
@pytest .fixture
211
- def repository (installation , get_mock_github_api , baker ):
211
+ def repository (installation , aget_mock_github_api , baker ):
212
212
repository = baker .make (
213
213
"django_github_app.Repository" ,
214
214
repository_id = seq .next (),
215
215
full_name = "owner/repo" ,
216
216
installation = installation ,
217
217
)
218
- mock_github_api = get_mock_github_api (
218
+ mock_github_api = aget_mock_github_api (
219
219
[
220
220
{
221
221
"number" : 1 ,
@@ -235,14 +235,14 @@ def repository(installation, get_mock_github_api, baker):
235
235
236
236
237
237
@pytest_asyncio .fixture
238
- async def arepository (ainstallation , get_mock_github_api , baker ):
238
+ async def arepository (ainstallation , aget_mock_github_api , baker ):
239
239
repository = await sync_to_async (baker .make )(
240
240
"django_github_app.Repository" ,
241
241
repository_id = seq .next (),
242
242
full_name = "owner/repo" ,
243
243
installation = ainstallation ,
244
244
)
245
- mock_github_api = get_mock_github_api (
245
+ mock_github_api = aget_mock_github_api (
246
246
[
247
247
{
248
248
"number" : 1 ,
0 commit comments