~frankban/charms/precise/juju-gui/deployer-031

« back to all changes in this revision

Viewing changes to tests/test_utils.py

  • Committer: Rick Harding
  • Date: 2014-01-16 19:25:52 UTC
  • mto: (148.1.1 git-ify)
  • mto: This revision was merged to the branch mainline in revision 149.
  • Revision ID: rick.harding@canonical.com-20140116192552-jq6o8e9ok3zf6q41
update per review

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# This file is part of the Juju GUI, which lets users view and manage Juju
2
2
# environments within a graphical interface (https://launchpad.net/juju-gui).
3
 
# Copyright (C) 2012-2013 Canonical Ltd.
 
3
# Copyright (C) 2012-2014 Canonical Ltd.
4
4
#
5
5
# This program is free software: you can redistribute it and/or modify it under
6
6
# the terms of the GNU Affero General Public License version 3, as published by
368
368
        self.add('juju-gui-1.2.3.4.tgz')  # Wrong version.
369
369
        self.add('juju-gui-1.2.3.build.42.tgz')  # Missing "+" separator.
370
370
        self.add('juju-gui-1.2.3+built.42.tgz')  # Typo.
371
 
        self.add('juju-gui-1.2.3+build.42.47.tgz')  # Invalid bzr revno.
 
371
        self.add('juju-gui-1.2.3+build.42.47.tgz')  # Invalid revno.
372
372
        self.add('juju-gui-1.2.3+build.42.bz2')  # Wrong file extension again.
373
373
        with self.mock_releases_dir():
374
374
            with self.assert_error():
657
657
        self.assertTupleEqual(expected, parse_source('develop'))
658
658
 
659
659
    @mock.patch('utils.log')
660
 
    def test_stable_release(self, mock_log):
 
660
    def test_stable_release(self, *args):
661
661
        # Ensure a specific stable release is correctly parsed.
662
662
        expected = ('stable', '0.1.0')
663
663
        self.assertTupleEqual(expected, parse_source('0.1.0'))
669
669
        self.assertEqual(expected, parse_source(source))
670
670
 
671
671
    def test_git_branch_and_revision(self):
672
 
        # A Bazaar branch is correctly parsed when including revision.
 
672
        # A Git branch is correctly parsed when including revision.
673
673
        sources = (
674
674
            'https://github.com/juju/juju-gui.git test_feature',
675
675
            'https://github.com/juju/juju-gui.git @de5e6',