| 193 | self.client = Algorithmia.client() |
| 194 | |
| 195 | def test_call_customCert(self): |
| 196 | open("./test.pem", 'w') |
| 197 | c = Algorithmia.client(ca_cert="./test.pem") |
| 198 | result = c.algo('quality/echo').pipe(bytearray('foo', 'utf-8')) |
| 199 | self.assertEqual('binary', result.metadata.content_type) |
| 200 | self.assertEqual(bytearray('foo', 'utf-8'), result.result) |
| 201 | try: |
| 202 | os.remove("./test.pem") |
| 203 | except OSError as e: |
| 204 | print(e) |
| 205 | |
| 206 | def test_call_binary(self): |
| 207 | result = self.client.algo('quality/echo').pipe(bytearray('foo', 'utf-8')) |