Skip to content

Commit 06f8230

Browse files
author
Dean Troyer
committed
Set up common utils
1 parent 11d3ba4 commit 06f8230

4 files changed

Lines changed: 29 additions & 134 deletions

File tree

openstackclient/common/utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@
1212
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
1313
# License for the specific language governing permissions and limitations
1414
# under the License.
15+
#
16+
# vim: tabstop=4 shiftwidth=4 softtabstop=4
17+
18+
"""
19+
Common client utilities
20+
"""
1521

1622
import os
1723
import uuid
1824

1925
import prettytable
2026

21-
from glanceclient.common import exceptions
27+
from openstackclient.common import exceptions
2228

2329

2430
# Decorator for cli-args

openstackclient/compute/v2/server.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@
1212
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
1313
# License for the specific language governing permissions and limitations
1414
# under the License.
15+
#
16+
# vim: tabstop=4 shiftwidth=4 softtabstop=4
17+
18+
"""
19+
Server action implementations
20+
"""
1521

16-
from glanceclient.common import utils
22+
from openstackclient.common import utils
1723

1824

1925
def _find_server(cs, server):

openstackclient/utils.py.dt

Lines changed: 0 additions & 131 deletions
This file was deleted.

tests/utils.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
# vim: tabstop=4 shiftwidth=4 softtabstop=4
22

3+
import time
4+
5+
import mox
36
import unittest
47

58

69
class TestCase(unittest.TestCase):
7-
pass
10+
11+
def setUp(self):
12+
super(TestCase, self).setUp()
13+
self.mox = mox.Mox()
14+
self._original_time = time.time
15+
time.time = lambda: 1234
16+
17+
def tearDown(self):
18+
time.time = self._original_time
19+
super(TestCase, self).tearDown()
20+
self.mox.UnsetStubs()
21+
self.mox.VerifyAll()

0 commit comments

Comments
 (0)