def test_invalid_device(self): out = StringIO() sys.stdout = out args = 'note foobar invalid recipient device'.split(' ') main(args) output = out.getvalue().strip() self.assertTrue('Device name not recognized' in output)
def test_help_message(self): out = StringIO() sys.stdout = out args = 'help'.split(' ') main(args) output = out.getvalue().strip() self.assertTrue('Valid commands:' in output)
def test_invalid_command(self): out = StringIO() sys.stdout = out args = 'non_existent_command and some other stuff'.split(' ') main(args) output = out.getvalue().strip() self.assertTrue('Unknown command' in output)
def test_send_deployment_update(self): major, minor, _, _, _ = sys.version_info args = 'note all Unit tests running on {} Python {}.{}'.format( platform.system(), major, minor).split(' ') main(args)
def test_send_deployment_update(self): major, minor, _, _, _ = sys.version_info args = "note all Unit tests running on {} Python {}.{}".format(platform.system(), major, minor).split(" ") main(args)