@@ -23,57 +23,57 @@ def client(app, aiohttp_client, loop):
2323async def test_index (client , app ):
2424 giphy_client_mock = mock .AsyncMock (spec = GiphyClient )
2525 giphy_client_mock .search .return_value = {
26- ' data' : [
27- {' url' : ' https://giphy.com/gif1.gif' },
28- {' url' : ' https://giphy.com/gif2.gif' },
26+ " data" : [
27+ {" url" : " https://giphy.com/gif1.gif" },
28+ {" url" : " https://giphy.com/gif2.gif" },
2929 ],
3030 }
3131
3232 with app .container .giphy_client .override (giphy_client_mock ):
3333 response = await client .get (
34- '/' ,
34+ "/" ,
3535 params = {
36- ' query' : ' test' ,
37- ' limit' : 10 ,
36+ " query" : " test" ,
37+ " limit" : 10 ,
3838 },
3939 )
4040
4141 assert response .status == 200
4242 data = await response .json ()
4343 assert data == {
44- ' query' : ' test' ,
45- ' limit' : 10 ,
46- ' gifs' : [
47- {' url' : ' https://giphy.com/gif1.gif' },
48- {' url' : ' https://giphy.com/gif2.gif' },
44+ " query" : " test" ,
45+ " limit" : 10 ,
46+ " gifs" : [
47+ {" url" : " https://giphy.com/gif1.gif" },
48+ {" url" : " https://giphy.com/gif2.gif" },
4949 ],
5050 }
5151
5252
5353async def test_index_no_data (client , app ):
5454 giphy_client_mock = mock .AsyncMock (spec = GiphyClient )
5555 giphy_client_mock .search .return_value = {
56- ' data' : [],
56+ " data" : [],
5757 }
5858
5959 with app .container .giphy_client .override (giphy_client_mock ):
60- response = await client .get ('/' )
60+ response = await client .get ("/" )
6161
6262 assert response .status == 200
6363 data = await response .json ()
64- assert data [' gifs' ] == []
64+ assert data [" gifs" ] == []
6565
6666
6767async def test_index_default_params (client , app ):
6868 giphy_client_mock = mock .AsyncMock (spec = GiphyClient )
6969 giphy_client_mock .search .return_value = {
70- ' data' : [],
70+ " data" : [],
7171 }
7272
7373 with app .container .giphy_client .override (giphy_client_mock ):
74- response = await client .get ('/' )
74+ response = await client .get ("/" )
7575
7676 assert response .status == 200
7777 data = await response .json ()
78- assert data [' query' ] == app .container .config .default .query ()
79- assert data [' limit' ] == app .container .config .default .limit ()
78+ assert data [" query" ] == app .container .config .default .query ()
79+ assert data [" limit" ] == app .container .config .default .limit ()
0 commit comments