~sseman/juju-ci-tools/assess-min-version

« back to all changes in this revision

Viewing changes to tests/test_industrial_test.py

  • Committer: Aaron Bentley
  • Date: 2016-03-18 14:47:06 UTC
  • mto: This revision was merged to the branch mainline in revision 1324.
  • Revision ID: aaron.bentley@canonical.com-20160318144706-z7wy9c21m3psi6g5
Introduce set_model_name, update tests, check controller on bootstrap.

Show diffs side-by-side

added added

removed removed

Lines of Context:
524
524
            DestroyEnvironmentAttempt]), 'log-dir', 5)
525
525
        with self.patch_client(lambda x, y=None, debug=False: (x, y)):
526
526
            industrial = mit.make_industrial_test()
527
 
        self.assertEqual(industrial.old_client,
528
 
                         (SimpleEnvironment('foo-env-old', {}), None))
529
 
        self.assertEqual(industrial.new_client,
530
 
                         (SimpleEnvironment('foo-env-new', {}), 'bar-path'))
 
527
        self.assertEqual(industrial.old_client, (
 
528
            SimpleEnvironment('foo-env-old', {'name': 'foo-env-old'}), None))
 
529
        self.assertEqual(industrial.new_client, (
 
530
            SimpleEnvironment('foo-env-new', {'name': 'foo-env-new'}),
 
531
            'bar-path'))
531
532
        self.assertEqual(len(industrial.stage_attempts), 1)
532
533
        self.assertEqual([mit.stages], [sa.attempt_list for sa in
533
534
                         industrial.stage_attempts])
541
542
        self.assertEqual(
542
543
            industrial.new_client, (
543
544
                SimpleEnvironment('foo-env-new', {
544
 
                    'tools-metadata-url': 'http://example.com'}),
 
545
                    'name': 'foo-env-new',
 
546
                    'tools-metadata-url': 'http://example.com',
 
547
                    }),
545
548
                'bar-path')
546
549
            )
547
550
 
832
835
                industrial = IndustrialTest.from_args(
833
836
                    'foo', 'new-juju-path', [])
834
837
        self.assertIsInstance(industrial, IndustrialTest)
835
 
        self.assertEqual(industrial.old_client,
836
 
                         (SimpleEnvironment('foo-old', {}), None))
837
 
        self.assertEqual(industrial.new_client,
838
 
                         (SimpleEnvironment('foo-new', {}), 'new-juju-path'))
 
838
        self.assertEqual(industrial.old_client, (
 
839
            SimpleEnvironment('foo-old', {'name': 'foo-old'}), None))
 
840
        self.assertEqual(industrial.new_client, (
 
841
            SimpleEnvironment('foo-new', {'name': 'foo-new'}),
 
842
            'new-juju-path'))
839
843
        self.assertNotEqual(industrial.old_client[0].environment,
840
844
                            industrial.new_client[0].environment)
841
845