def test_available(self): ''' Test if it returns ``True`` if the specified service is available, otherwise returns ``False``. ''' with patch.object(os, 'listdir', MagicMock(return_value=['/etc/service'])): self.assertTrue(s6.available('/etc/service'))
def test_available(self): """ Test if it returns ``True`` if the specified service is available, otherwise returns ``False``. """ with patch.object(os, "listdir", MagicMock(return_value=["/etc/service"])): self.assertTrue(s6.available("/etc/service"))