@@ -91,18 +91,18 @@ async def test_derive(self, cli):
9191 @pytest .mark .asyncio
9292 async def test_send_simple (self , cli ):
9393 id_ , secret = pytest .msgapi ['msgapi' ]['id' ], pytest .msgapi ['msgapi' ]['secret' ]
94- output = await cli ('send_simple ' , 'ECHOECHO' , id_ , secret , input = 'Hello!' )
94+ output = await cli ('send-simple ' , 'ECHOECHO' , id_ , secret , input = 'Hello!' )
9595 assert output
9696
9797 @pytest .mark .asyncio
9898 async def test_send_e2e (self , cli , server ):
9999 output_1 = await cli (
100- 'send_e2e ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
100+ 'send-e2e ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
101101 pytest .msgapi ['msgapi' ]['secret' ], pytest .msgapi ['msgapi' ]['private' ],
102102 input = 'Hello!' )
103103 assert output_1
104104 output_2 = await cli (
105- 'send_e2e ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
105+ 'send-e2e ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
106106 pytest .msgapi ['msgapi' ]['secret' ], pytest .msgapi ['msgapi' ]['private' ], '-k' ,
107107 server .echoecho_encoded_key , input = 'Hello!' )
108108 assert output_2
@@ -112,13 +112,13 @@ async def test_send_e2e(self, cli, server):
112112 async def test_send_image (self , cli , server ):
113113 server .latest_blob_ids = []
114114 output_1 = await cli (
115- 'send_image ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
115+ 'send-image ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
116116 pytest .msgapi ['msgapi' ]['secret' ], pytest .msgapi ['msgapi' ]['private' ],
117117 server .threema_jpg )
118118 assert output_1
119119 assert len (server .latest_blob_ids ) == 1
120120 output_2 = await cli (
121- 'send_image ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
121+ 'send-image ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
122122 pytest .msgapi ['msgapi' ]['secret' ], pytest .msgapi ['msgapi' ]['private' ],
123123 server .threema_jpg , '-k' , server .echoecho_encoded_key )
124124 assert output_2
@@ -129,20 +129,20 @@ async def test_send_image(self, cli, server):
129129 async def test_send_video (self , cli , server ):
130130 server .latest_blob_ids = []
131131 output_1 = await cli (
132- 'send_video ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
132+ 'send-video ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
133133 pytest .msgapi ['msgapi' ]['secret' ], pytest .msgapi ['msgapi' ]['private' ],
134134 server .threema_mp4 , server .threema_jpg )
135135 assert output_1
136136 assert len (server .latest_blob_ids ) == 2
137137 output_2 = await cli (
138- 'send_video ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
138+ 'send-video ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
139139 pytest .msgapi ['msgapi' ]['secret' ], pytest .msgapi ['msgapi' ]['private' ],
140140 server .threema_mp4 , server .threema_jpg , '-k' , server .echoecho_encoded_key )
141141 assert output_2
142142 assert output_1 == output_2
143143 assert len (server .latest_blob_ids ) == 4
144144 output = await cli (
145- 'send_video ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
145+ 'send-video ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
146146 pytest .msgapi ['msgapi' ]['secret' ], pytest .msgapi ['msgapi' ]['private' ],
147147 server .threema_mp4 , server .threema_jpg , '-d' , '1337' )
148148 assert output
@@ -152,26 +152,26 @@ async def test_send_video(self, cli, server):
152152 async def test_send_file (self , cli , server ):
153153 server .latest_blob_ids = []
154154 output_1 = await cli (
155- 'send_file ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
155+ 'send-file ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
156156 pytest .msgapi ['msgapi' ]['secret' ], pytest .msgapi ['msgapi' ]['private' ],
157157 server .threema_jpg )
158158 assert output_1
159159 assert len (server .latest_blob_ids ) == 1
160160 output_2 = await cli (
161- 'send_file ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
161+ 'send-file ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
162162 pytest .msgapi ['msgapi' ]['secret' ], pytest .msgapi ['msgapi' ]['private' ],
163163 server .threema_jpg , '-k' , server .echoecho_encoded_key )
164164 assert output_2
165165 assert output_1 == output_2
166166 assert len (server .latest_blob_ids ) == 2
167167 output = await cli (
168- 'send_file ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
168+ 'send-file ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
169169 pytest .msgapi ['msgapi' ]['secret' ], pytest .msgapi ['msgapi' ]['private' ],
170170 server .threema_jpg , '-t' , server .threema_jpg )
171171 assert output
172172 assert len (server .latest_blob_ids ) == 4
173173 output = await cli (
174- 'send_file ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
174+ 'send-file ' , 'ECHOECHO' , pytest .msgapi ['msgapi' ]['id' ],
175175 pytest .msgapi ['msgapi' ]['secret' ], pytest .msgapi ['msgapi' ]['private' ],
176176 server .threema_jpg , '-k' , server .echoecho_encoded_key , '-t' ,
177177 server .threema_jpg )
@@ -253,5 +253,5 @@ async def test_insufficient_credits(self, cli):
253253 with pytest .raises (subprocess .CalledProcessError ) as exc_info :
254254 id_ , secret = pytest .msgapi ['msgapi' ]['nocredit_id' ],\
255255 pytest .msgapi ['msgapi' ]['secret' ]
256- await cli ('send_simple ' , 'ECHOECHO' , id_ , secret , input = '!' )
256+ await cli ('send-simple ' , 'ECHOECHO' , id_ , secret , input = '!' )
257257 assert 'Insufficient credits' in exc_info .value .output
0 commit comments