def test_bsd_jail_path(self, call_mock): """ Tests the bsd_jail_path function. """ # check when we don't have a jail call_mock.return_value = [] self.assertEqual(None, system.bsd_jail_path(1)) call_mock.side_effect = mock_call(system.GET_BSD_JAIL_PATH % '1', GET_BSD_JAIL_PATH_RESULTS) self.assertEqual('/usr/jails/tor-jail', system.bsd_jail_path(1))
def test_bsd_jail_path(self, call_mock): """ Tests the bsd_jail_path function. """ # check when we don't have a jail call_mock.return_value = [] self.assertEqual(None, system.bsd_jail_path(1)) call_mock.side_effect = mock_call(system.GET_BSD_JAIL_PATH % '1', GET_BSD_JAIL_PATH_RESULTS) self.assertEqual('/usr/jails/tor-jail', system.bsd_jail_path(1))