~andrewjbeach/juju-ci-tools/make-local-patcher

« back to all changes in this revision

Viewing changes to tests/test_jujupy.py

  • Committer: Andrew Beach
  • Date: 2016-10-27 15:15:04 UTC
  • mto: This revision was merged to the branch mainline in revision 1693.
  • Revision ID: andrew.beach@canonical.com-20161027151504-rxldu95563a8zkp8
ServiceStatus->Status1X

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
    NoProvider,
65
65
    parse_new_state_server_from_error,
66
66
    SimpleEnvironment,
67
 
    ServiceStatus,
 
67
    Status1X,
68
68
    SoftDeadlineExceeded,
69
69
    Status,
70
70
    SYSTEM,
3663
3663
            result = client.get_status()
3664
3664
        gjo_mock.assert_called_once_with(
3665
3665
            'status', '--format', 'yaml', controller=False)
3666
 
        self.assertEqual(ServiceStatus, type(result))
 
3666
        self.assertEqual(Status1X, type(result))
3667
3667
        self.assertEqual(['a', 'b', 'c'], result.status)
3668
3668
 
3669
3669
    def test_get_status_retries_on_error(self):
4023
4023
                        'jenkins', 'sub1', start=now - timedelta(1200))
4024
4024
 
4025
4025
    def test_wait_for_workload(self):
4026
 
        initial_status = ServiceStatus.from_text("""\
 
4026
        initial_status = Status1X.from_text("""\
4027
4027
            services:
4028
4028
              jenkins:
4029
4029
                units:
5938
5938
        self.assertEqual({'application': {}}, status.get_applications())
5939
5939
 
5940
5940
 
5941
 
class TestServiceStatus(FakeHomeTestCase):
 
5941
class TestStatus1X(FakeHomeTestCase):
5942
5942
 
5943
5943
    def test_get_applications_gets_services(self):
5944
 
        status = ServiceStatus({
 
5944
        status = Status1X({
5945
5945
            'services': {'service': {}},
5946
5946
            'applications': {'application': {}},
5947
5947
            }, '')