~bac/charms/trusty/openstack-dashboard/dashboard-plugin

« back to all changes in this revision

Viewing changes to unit_tests/test_horizon_hooks.py

  • Committer: Brad Crittenden
  • Date: 2015-10-14 20:13:23 UTC
  • mfrom: (84.1.9 apache-slugs)
  • Revision ID: bac@canonical.com-20151014201323-h4yyijpf4rd1msqc
[r=jcsackett,jrwren] Backport changes from upstream. Add apache_http_addendum and apache_https_addendum to configuration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
308
308
        self._call_hook('website-relation-joined')
309
309
        self.relation_set.assert_called_with(port=70, hostname='192.168.1.1')
310
310
 
 
311
    @patch.object(hooks, 'os_release')
311
312
    @patch.object(hooks, 'git_install_requested')
312
 
    def test_dashboard_config_joined_not_git(self, _git_requested):
 
313
    def test_dashboard_config_joined_not_git(
 
314
            self, _git_requested, _os_release):
313
315
        _git_requested.return_value = False
 
316
        _os_release.return_value = 'vivid'
314
317
        self._call_hook('dashboard-plugin-relation-joined')
315
318
        self.relation_set.assert_called_with(
 
319
            release='vivid',
316
320
            bin_path='/usr/bin',
317
321
            openstack_dir='/usr/share/openstack-dashboard',
318
322
            relation_id=None
319
323
        )
320
324
 
 
325
    @patch.object(hooks, 'os_release')
321
326
    @patch.object(hooks, 'git_pip_venv_dir')
322
327
    @patch.object(hooks, 'git_install_requested')
323
 
    def test_dashboard_config_joined_git(self, _git_requested,
324
 
                                         _git_pip_venv_dir):
 
328
    def test_dashboard_config_joined_git(
 
329
            self, _git_requested, _git_pip_venv_dir, _os_release):
325
330
        expected_bin_path = '/mnt/fuji/venv'
326
331
        _git_requested.return_value = True
327
332
        _git_pip_venv_dir.return_value = expected_bin_path
 
333
        _os_release.return_value = 'wily'
328
334
        self._call_hook('dashboard-plugin-relation-joined')
329
335
        self.relation_set.assert_called_with(
 
336
            release='wily',
330
337
            bin_path=expected_bin_path,
331
338
            openstack_dir='/usr/share/openstack-dashboard',
332
339
            relation_id=None