~stephanpampel/landscape-client-charm/landscape-client-charm

« back to all changes in this revision

Viewing changes to hooks/test_hooks.py

  • Committer: Simon Poirier
  • Date: 2018-02-24 05:26:59 UTC
  • mto: This revision was merged to the branch mainline in revision 66.
  • Revision ID: simon.poirier@canonical.com-20180224052659-xz817rq1b86anqhb
make python hooks run on version used by landscape-client

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
from unittest import TestCase
7
7
from uuid import uuid4
8
8
 
 
9
import six
9
10
from landscape.deployment import Configuration
10
11
from landscape.lib.fs import read_file
11
12
import hooks
105
106
        super(MigrateOldJujuInfoTest, self).setUp()
106
107
 
107
108
    def setup_old_juju_info(self, juju_info):
108
 
        for filename, contents in juju_info.iteritems():
 
109
        for filename, contents in six.iteritems(juju_info):
109
110
            juju_path = os.path.join(self.config.meta_data_path, filename)
110
111
            with open(juju_path, "w") as juju_file:
111
112
                juju_file.write(contents)