Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
 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)
Ejemplo n.º 6
0
 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)
Ejemplo n.º 7
0
 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)
Ejemplo n.º 8
0
 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)