~gz/juju-ci-tools/maas_spacelessness

« back to all changes in this revision

Viewing changes to tests/test_jujupy.py

  • Committer: Andrew Beach
  • Date: 2016-10-24 16:14:59 UTC
  • mfrom: (1662.1.13 delete-old-clients)
  • Revision ID: andrew.beach@canonical.com-20161024161459-y3un0fdfhnhwhxlg
Merge: Removed support for EnvJujuClient2B8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
    EnvJujuClient22,
46
46
    EnvJujuClient24,
47
47
    EnvJujuClient25,
48
 
    EnvJujuClient2B8,
49
48
    EnvJujuClient2B9,
50
49
    EnvJujuClientRC,
51
50
    ErroredUnit,
514
513
            test_fc('2.0-beta5', None)
515
514
            test_fc('2.0-beta6', None)
516
515
            test_fc('2.0-beta7', None)
517
 
            test_fc('2.0-beta8', EnvJujuClient2B8)
 
516
            test_fc('2.0-beta8', None)
518
517
            test_fc('2.0-beta9', EnvJujuClient2B9)
519
518
            test_fc('2.0-beta10', EnvJujuClient2B9)
520
519
            test_fc('2.0-beta11', EnvJujuClient2B9)
3248
3247
        self.assertEqual({'test-mode': True}, config)
3249
3248
 
3250
3249
 
3251
 
class TestEnvJujuClient2B8(ClientTest):
3252
 
 
3253
 
    def test_remove_service(self):
3254
 
        env = EnvJujuClient2B8(
3255
 
            JujuData('foo', {'type': 'local'}), '1.234-76', None)
3256
 
        with patch.object(env, 'juju') as mock_juju:
3257
 
            env.remove_service('mondogb')
3258
 
        mock_juju.assert_called_with('remove-service', ('mondogb',))
3259
 
 
3260
 
    def test_deployer(self):
3261
 
        client = EnvJujuClient2B8(JujuData('foo', {'type': 'local'}),
3262
 
                                  '1.23-series-arch', None)
3263
 
        with patch.object(EnvJujuClient, 'juju') as mock:
3264
 
            client.deployer('bundle:~juju-qa/some-bundle')
3265
 
        mock.assert_called_with(
3266
 
            'deployer', ('-e', 'local.foo:foo', '--debug', '--deploy-delay',
3267
 
                         '10', '--timeout', '3600', '--config',
3268
 
                         'bundle:~juju-qa/some-bundle'),
3269
 
            True, include_e=False
3270
 
        )
3271
 
 
3272
 
    def test_deployer_with_bundle_name(self):
3273
 
        client = EnvJujuClient2B8(JujuData('foo', {'type': 'local'}),
3274
 
                                  '2.0.0-series-arch', None)
3275
 
        with patch.object(EnvJujuClient, 'juju') as mock:
3276
 
            client.deployer('bundle:~juju-qa/some-bundle', 'name')
3277
 
        mock.assert_called_with(
3278
 
            'deployer', ('-e', 'local.foo:foo', '--debug', '--deploy-delay',
3279
 
                         '10', '--timeout', '3600', '--config',
3280
 
                         'bundle:~juju-qa/some-bundle', 'name'),
3281
 
            True, include_e=False
3282
 
        )
3283
 
 
3284
 
 
3285
3250
class TestEnvJujuClient2B9(ClientTest):
3286
3251
 
3287
3252
    def test_get_model_uuid_returns_uuid(self):