~ajkavanagh/charm-helpers/add-service-checks-lp1524388

« back to all changes in this revision

Viewing changes to tests/fetch/test_giturl.py

  • Committer: Liam Young
  • Date: 2016-01-08 13:52:00 UTC
  • mfrom: (514.1.1 charm-helpers)
  • Revision ID: liam.young@canonical.com-20160108135200-pf3m9ws2eknys4zi
[corey.bryant, r=gnuoy] 

    Add git clone depth option to OpenStack deploy from source

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
            if dst:
90
90
                shutil.rmtree(dst, ignore_errors=True)
91
91
 
92
 
    @patch('charmhelpers.fetch.giturl.mkdir')
93
 
    def test_installs(self, _mkdir):
 
92
    def test_installs(self):
94
93
        self.fh.clone = MagicMock()
95
94
 
96
95
        for url in self.valid_urls:
100
99
            with patch.dict('os.environ', {'CHARM_DIR': 'foo'}):
101
100
                where = self.fh.install(url)
102
101
            self.assertEqual(where, dest)
103
 
            _mkdir.assert_called_with(where, perms=0o755)
104
102
 
105
 
    @patch('charmhelpers.fetch.giturl.mkdir')
106
 
    def test_installs_specified_dest(self, _mkdir):
 
103
    def test_installs_specified_dest(self):
107
104
        self.fh.clone = MagicMock()
108
105
 
109
106
        for url in self.valid_urls: