308
308
self._call_hook('website-relation-joined')
309
309
self.relation_set.assert_called_with(port=70, hostname='192.168.1.1')
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(
316
320
bin_path='/usr/bin',
317
321
openstack_dir='/usr/share/openstack-dashboard',
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,
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(
330
337
bin_path=expected_bin_path,
331
338
openstack_dir='/usr/share/openstack-dashboard',