@@ -32,11 +32,11 @@ class TestQuotePlugin:
3232 pytest .mark .bot (config = """
3333 ["@bot"]
3434 plugins = ["mongodb", "usertrack", "auth", "quote"]
35-
35+
3636 [auth]
3737 nickaccount = "#First:quote"
3838 otheraccount = "#Second:quote"
39-
39+
4040 [mongodb]
4141 mode = "mock"
4242 """ ),
@@ -96,7 +96,7 @@ async def test_client_quote_add_pattern_find(self):
9696
9797 async def test_client_quotes_not_exist (self ):
9898 await self ._recv_privmsg ('Nick!~user@host' , '#First' , '!quote Nick' )
99- self .bot_helper .assert_sent ('NOTICE {} :{}' . format ( ' #First' , ' No data for Nick') )
99+ self .bot_helper .assert_sent ('NOTICE #First : No data for Nick' )
100100
101101 async def test_client_quote_add_multi (self ):
102102 await self ._recv_privmsg ('Nick!~user@host' , '#First' , 'test data' )
@@ -110,10 +110,10 @@ async def test_client_quote_channel_specific_logs(self):
110110 await self ._recv_privmsg ('Nick!~user@host' , '#First' , 'other data' )
111111
112112 await self ._recv_privmsg ('Other!~user@host' , '#Second' , '!remember Nick' )
113- self .bot_helper .assert_sent ('NOTICE {} :{}' . format ( ' #Second' , ' No data for Nick') )
113+ self .bot_helper .assert_sent ('NOTICE #Second : No data for Nick' )
114114
115115 await self ._recv_privmsg ('Other!~user@host' , '#Second' , '!quote Nick' )
116- self .bot_helper .assert_sent ('NOTICE {} :{}' . format ( ' #Second' , ' No data for Nick') )
116+ self .bot_helper .assert_sent ('NOTICE #Second : No data for Nick' )
117117
118118 async def test_client_quote_channel_specific_quotes (self ):
119119 await self ._recv_privmsg ('Nick!~user@host' , '#First' , 'test data' )
@@ -129,8 +129,8 @@ async def test_client_quote_channel_specific_quotes(self):
129129
130130 async def test_client_quote_channel_fill_logs (self ):
131131 for i in range (150 ):
132- await self ._recv_privmsg ('Nick!~user@host' , '#First' , 'test data#{}' . format ( i ) )
133- await self ._recv_privmsg ('Nick!~user@host' , '#Second' , 'other data#{}' . format ( i ) )
132+ await self ._recv_privmsg ('Nick!~user@host' , '#First' , f 'test data#{ i } ' )
133+ await self ._recv_privmsg ('Nick!~user@host' , '#Second' , f 'other data#{ i } ' )
134134
135135 await self ._recv_privmsg ('Other!~user@host' , '#Second' , '!remember Nick data#135' )
136136 await self ._recv_privmsg ('Other!~user@host' , '#Second' , '!quote Nick' )
@@ -154,7 +154,7 @@ async def test_client_quotes_list(self):
154154 await self ._recv_line (":Other!~other@otherhost ACCOUNT otheraccount" )
155155
156156 # stick some quotes in a thing
157- data = ['test data#{}' . format ( i ) for i in range (10 )]
157+ data = [f 'test data#{ i } ' for i in range (10 )]
158158 for msg in data :
159159 await self ._recv_privmsg ('Nick!~user@host' , '#Second' , msg )
160160 await self ._recv_privmsg ('Other!~user@host' , '#Second' , '!remember Nick' )
@@ -187,7 +187,7 @@ async def test_client_quote_remove(self):
187187 await self ._recv_privmsg ('Nick!~user@host' , '#First' , '!quote.remove 0' )
188188
189189 await self ._recv_privmsg ('Nick!~user@host' , '#First' , '!quote Nick' )
190- self .bot_helper .assert_sent ('NOTICE {} :{}' . format ( ' #First' , ' No data for Nick') )
190+ self .bot_helper .assert_sent ('NOTICE #First : No data for Nick' )
191191
192192 async def test_client_quote_remove_no_permission (self ):
193193 await self ._recv_line (":Other!~other@otherhost ACCOUNT otheraccount" )
@@ -196,13 +196,13 @@ async def test_client_quote_remove_no_permission(self):
196196 await self ._recv_privmsg ('Other!~user@host' , '#First' , '!remember Nick' )
197197 await self ._recv_privmsg ('Other!~user@host' , '#First' , '!quote.remove -1' )
198198
199- self .bot_helper .assert_sent ('NOTICE {} :{}' . format ( ' #First' , ' error: otheraccount not authorised for #First:quote') )
199+ self .bot_helper .assert_sent ('NOTICE #First : error: otheraccount not authorised for #First:quote' )
200200
201201 async def test_client_quote_remove_no_quotes (self ):
202202 await self ._recv_line (":Nick!~user@host ACCOUNT nickaccount" )
203203 await self ._recv_privmsg ('Nick!~user@host' , '#First' , '!quote.remove -1' )
204204
205- self .bot_helper .assert_sent ('NOTICE {} :{}' . format ( ' #First' , ' Error: could not remove quote(s) with ID: -1') )
205+ self .bot_helper .assert_sent ('NOTICE #First : Error: could not remove quote(s) with ID: -1' )
206206
207207 async def test_client_quote_list_no_permission (self ):
208208 await self ._recv_line (":Other!~other@otherhost ACCOUNT otheraccount" )
@@ -211,7 +211,7 @@ async def test_client_quote_list_no_permission(self):
211211 await self ._recv_privmsg ('Other!~user@host' , '#First' , '!remember Nick' )
212212 await self ._recv_privmsg ('Other!~user@host' , '#First' , '!quote.list' )
213213
214- self .bot_helper .assert_sent ('NOTICE {} :{}' . format ( ' #First' , ' error: otheraccount not authorised for #First:quote') )
214+ self .bot_helper .assert_sent ('NOTICE #First : error: otheraccount not authorised for #First:quote' )
215215
216216 async def test_client_quote_channelwide (self ):
217217 await self ._recv_privmsg ('Nick!~user@host' , '#First' , 'test data!' )
0 commit comments