~harlowja/cloud-init/cloud-init-net-refactor

« back to all changes in this revision

Viewing changes to tests/unittests/test_cs_util.py

  • Committer: Joshua Harlow
  • Date: 2016-05-19 21:26:30 UTC
  • mfrom: (1215.1.18 cloud-init)
  • Revision ID: harlowja@gmail.com-20160519212630-b2l2fsshopo50fdk
RemergeĀ againstĀ head/master

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from __future__ import print_function
2
2
 
3
 
import sys
4
 
import unittest
 
3
from . import helpers as test_helpers
5
4
 
6
5
from cloudinit.cs_utils import Cepko
7
6
 
8
 
try:
9
 
    skip = unittest.skip
10
 
except AttributeError:
11
 
    # Python 2.6.  Doesn't have to be high fidelity.
12
 
    def skip(reason):
13
 
        def decorator(func):
14
 
            def wrapper(*args, **kws):
15
 
                print(reason, file=sys.stderr)
16
 
            return wrapper
17
 
        return decorator
18
 
 
19
7
 
20
8
SERVER_CONTEXT = {
21
9
    "cpu": 1000,
43
31
# 2015-01-22 BAW: This test is completely useless because it only ever tests
44
32
# the CepkoMock object.  Even in its original form, I don't think it ever
45
33
# touched the underlying Cepko class methods.
46
 
@skip('This test is completely useless')
47
 
class CepkoResultTests(unittest.TestCase):
 
34
class CepkoResultTests(test_helpers.TestCase):
48
35
    def setUp(self):
49
 
        pass
50
 
        # self.mocked = self.mocker.replace("cloudinit.cs_utils.Cepko",
51
 
        #                     spec=CepkoMock,
52
 
        #                     count=False,
53
 
        #                     passthrough=False)
54
 
        # self.mocked()
55
 
        # self.mocker.result(CepkoMock())
56
 
        # self.mocker.replay()
57
 
        # self.c = Cepko()
 
36
        raise test_helpers.SkipTest('This test is completely useless')
58
37
 
59
38
    def test_getitem(self):
60
39
        result = self.c.all()