def test__conncheck_home_dir(self):
    self.patch('zaza.utilities.installers.user_directory', name='mock_user_directory')
    self.mock_user_directory.return_value = '/some/dir'
    self.assertEqual(self.c._conncheck_home_dir, '/some/dir')
    self.mock_user_directory.assert_called_once_with(None, 'conncheck')
    self.mock_user_directory.reset_mock()
    self.assertEqual(self.c._conncheck_home_dir, '/some/dir')
    self.mock_user_directory.assert_not_called()
def test__conncheck_home_dir(self):
    self.patch('zaza.utilities.installers.user_directory', name='mock_user_directory')
    self.mock_user_directory.return_value = '/some/dir'
    self.assertEqual(self.c._conncheck_home_dir, '/some/dir')
    self.mock_user_directory.assert_called_once_with(None, 'conncheck')
    self.mock_user_directory.reset_mock()
    self.assertEqual(self.c._conncheck_home_dir, '/some/dir')
    self.mock_user_directory.assert_not_called()