add tests for ninefold
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/2475916e Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/2475916e Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/2475916e Branch: refs/heads/trunk Commit: 2475916e0d17e4b03bb93970b88555a229a5f3c0 Parents: 4e32cc1 Author: Anthony Shaw <anthonys...@apache.org> Authored: Fri May 5 19:39:40 2017 +1000 Committer: Anthony Shaw <anthonys...@apache.org> Committed: Fri May 5 19:39:40 2017 +1000 ---------------------------------------------------------------------- libcloud/test/storage/test_ninefold.py | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/2475916e/libcloud/test/storage/test_ninefold.py ---------------------------------------------------------------------- diff --git a/libcloud/test/storage/test_ninefold.py b/libcloud/test/storage/test_ninefold.py new file mode 100644 index 0000000..57e24d4 --- /dev/null +++ b/libcloud/test/storage/test_ninefold.py @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import unittest +import base64 + +from libcloud.utils.py3 import b +from libcloud.storage.drivers.ninefold import NinefoldStorageDriver +from libcloud.test.storage.test_atmos import AtmosMockHttp, AtmosTests + + +class NinefoldTests(AtmosTests, unittest.TestCase): + + def setUp(self): + NinefoldStorageDriver.connectionCls.conn_class = AtmosMockHttp + NinefoldStorageDriver.path = '' + AtmosMockHttp.type = None + AtmosMockHttp.upload_created = False + self.driver = NinefoldStorageDriver('dummy', base64.b64encode(b('dummy'))) + self._remove_test_file()