def setUp(self): super().setUp() self.parser = ArgumentParser() self.cmd = snappy.cmd_init(self.parser) self.patch(os, 'getuid').return_value = 0 self.patch( os, 'environ', { 'SNAP': '/snap/maas', 'SNAP_COMMON': '/snap/maas/common', 'SNAP_DATA': '/snap/maas/data' }) self.mock_read_input = self.patch(snappy, 'read_input')
def setUp(self): super().setUp() self.parser = ArgumentParser() self.cmd = snappy.cmd_init(self.parser) self.patch(os, "getuid").return_value = 0 self.patch( os, "environ", { "SNAP": "/snap/maas", "SNAP_COMMON": "/snap/maas/common", "SNAP_DATA": "/snap/maas/data", }, ) self.mock_read_input = self.patch(snappy, "read_input")