2752: Add basic test for arv-put.
authorBrett Smith <brett@curoverse.com>
Thu, 22 May 2014 21:10:40 +0000 (17:10 -0400)
committerBrett Smith <brett@curoverse.com>
Fri, 30 May 2014 14:40:09 +0000 (10:40 -0400)
sdk/python/tests/test_arv-put.py [new file with mode: 0644]

diff --git a/sdk/python/tests/test_arv-put.py b/sdk/python/tests/test_arv-put.py
new file mode 100644 (file)
index 0000000..c5d446e
--- /dev/null
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+
+import os
+import tempfile
+import unittest
+
+import arvados
+import arvados.commands.put as arv_put
+from arvados_testutil import ArvadosKeepLocalStoreTestCase
+
+class ArvadosPutTest(ArvadosKeepLocalStoreTestCase):
+    def test_simple_file_put(self):
+        with self.make_test_file() as testfile:
+            path = testfile.name
+            arv_put.main(['--stream', '--no-progress', path])
+        self.assertTrue(
+            os.path.exists(os.path.join(os.environ['KEEP_LOCAL_STORE'],
+                                        '098f6bcd4621d373cade4e832627b4f6')),
+            "did not find file stream in Keep store")
+
+
+if __name__ == '__main__':
+    unittest.main()