2752: Add basic test for arv-put.
[arvados.git] / sdk / python / tests / test_arv-put.py
1 #!/usr/bin/env python
2
3 import os
4 import tempfile
5 import unittest
6
7 import arvados
8 import arvados.commands.put as arv_put
9 from arvados_testutil import ArvadosKeepLocalStoreTestCase
10
11 class ArvadosPutTest(ArvadosKeepLocalStoreTestCase):
12     def test_simple_file_put(self):
13         with self.make_test_file() as testfile:
14             path = testfile.name
15             arv_put.main(['--stream', '--no-progress', path])
16         self.assertTrue(
17             os.path.exists(os.path.join(os.environ['KEEP_LOCAL_STORE'],
18                                         '098f6bcd4621d373cade4e832627b4f6')),
19             "did not find file stream in Keep store")
20
21
22 if __name__ == '__main__':
23     unittest.main()