~abentley/juju-ci-tools/client-from-config-4

« back to all changes in this revision

Viewing changes to tests/test_substrate.py

  • Committer: Martin Packman
  • Date: 2016-04-27 21:59:00 UTC
  • mto: This revision was merged to the branch mainline in revision 1385.
  • Revision ID: martin.packman@canonical.com-20160427215900-uuffek99x7hbx52f
Correct check on MAASAccount types in test

Show diffs side-by-side

added added

removed removed

Lines of Context:
828
828
        config = get_maas_env().config
829
829
        with patch('subprocess.check_call', autospec=True) as cc_mock:
830
830
            with maas_account_from_config(config) as maas:
831
 
                self.assertIsInstance(maas, MAASAccount)
 
831
                self.assertIs(type(maas), MAASAccount)
832
832
                self.assertEqual(maas.profile, 'mas')
833
833
                self.assertEqual(maas.url, 'http://10.0.10.10/MAAS/api/2.0/')
834
834
                self.assertEqual(maas.oauth, 'a:password:string')
846
846
        with patch('subprocess.check_call', autospec=True,
847
847
                   side_effect=[login_error, None, None]) as cc_mock:
848
848
            with maas_account_from_config(config) as maas:
849
 
                self.assertIsInstance(maas, MAASAccount)
 
849
                self.assertIs(type(maas), MAAS1Account)
850
850
                self.assertEqual(maas.profile, 'mas')
851
851
                self.assertEqual(maas.url, 'http://10.0.10.10/MAAS/api/1.0/')
852
852
                self.assertEqual(maas.oauth, 'a:password:string')