~vila/uci-engine/config

« back to all changes in this revision

Viewing changes to juju-deployer/test_update.py

  • Committer: Chris Johnston
  • Author(s): Chris Johnston
  • Date: 2014-02-13 16:52:03 UTC
  • mfrom: (234.2.1 flake8)
  • Revision ID: chris_johnston-20140213165203-35fsot9tlfemblv4
[r=Vincent Ladeuil, PS Jenkins bot] Fix misc flake8 issues around the project  from Chris Johnston

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
    def test_get_branches_and_revnos(self):
133
133
        branch_url = self.get_branch_url()
134
134
        current = self.branch.revno()
135
 
        y = self.get_service_yaml(current -1)
 
135
        y = self.get_service_yaml(current - 1)
136
136
        path = os.path.join(self.temp_dir, 'foo.yaml')
137
137
        with open(path, 'w') as fp:
138
138
            fp.write(yaml.safe_dump(y))
141
141
            actual = update.get_branches_and_revnos(
142
142
                [path], True)
143
143
            msg = '{} is out of date (currently {}, latest {})'
144
 
            msg = msg.format(branch_url, current -1, current)
 
144
            msg = msg.format(branch_url, current - 1, current)
145
145
            warn.assert_called_with(msg)
146
146
        self.assertEqual(actual, {branch_url: current})
147
147