~veebers/juju-ci-tools/model_migration_check_all_units_of_charm

« back to all changes in this revision

Viewing changes to tests/test_assess_bootstrap.py

  • Committer: Andrew Beach
  • Date: 2016-10-24 21:14:16 UTC
  • mfrom: (1662.1.17 delete-old-clients)
  • Revision ID: andrew.beach@canonical.com-20161024211416-l4g7szfvrtl5w03k
Merged in changes to test_assess_bootstrap.py, changing the used version of juju.

Show diffs side-by-side

added added

removed removed

Lines of Context:
274
274
        def check(myself, metadata_source=None):
275
275
            self.assertEqual(self.target_dict, myself.env.config)
276
276
            self.assertIsNotNone(metadata_source)
277
 
        with extended_bootstrap_cxt('2.0-rc1'):
 
277
        with extended_bootstrap_cxt('2.0.0'):
278
278
            with patch('jujupy.EnvJujuClient.bootstrap', side_effect=check,
279
279
                       autospec=True):
280
280
                args = parse_args(['metadata', 'bar', '/foo'])
289
289
        def check(myself, metadata_source=None):
290
290
            self.assertEqual(self.target_dict, myself.env.config)
291
291
            self.assertEqual('agents', metadata_source)
292
 
        with extended_bootstrap_cxt('2.0-rc1'):
 
292
        with extended_bootstrap_cxt('2.0.0'):
293
293
            with patch('jujupy.EnvJujuClient.bootstrap', side_effect=check,
294
294
                       autospec=True):
295
295
                args = parse_args(['metadata', 'bar', '/foo'])
301
301
                    assess_metadata(bs_manager, 'agents')
302
302
 
303
303
    def test_assess_metadata_valid_url(self):
304
 
        with extended_bootstrap_cxt('2.0-rc1'):
 
304
        with extended_bootstrap_cxt('2.0.0'):
305
305
            with patch('jujupy.EnvJujuClient.bootstrap', autospec=True):
306
306
                args = parse_args(['metadata', 'bar', '/foo'])
307
307
                args.temp_env_name = 'qux'
342
342
            self.assertEqual({'name': 'qux', 'type': 'foo'},
343
343
                             myself.env.config)
344
344
            self.assertEqual(DEST, to)
345
 
        with extended_bootstrap_cxt('2.0-rc1'):
 
345
        with extended_bootstrap_cxt('2.0.0'):
346
346
            with patch('jujupy.EnvJujuClient.bootstrap', side_effect=check,
347
347
                       autospec=True):
348
348
                with patch('assess_bootstrap.get_controller_hostname',
358
358
            assess_to('bs_manager', None)
359
359
 
360
360
    def test_assess_to_fails(self):
361
 
        with extended_bootstrap_cxt('2.0-rc1'):
 
361
        with extended_bootstrap_cxt('2.0.0'):
362
362
            with patch('jujupy.EnvJujuClient.bootstrap', autospec=True):
363
363
                with patch('assess_bootstrap.get_controller_address',
364
364
                           return_value='255.1.1.0', autospec=True):