def test_diagnostics(self):
     msg = DiagnosticsItem("/Status Message")
     self.assertEqual('',msg.get_parent_name())
     self.assertEqual("Status Message", msg.get_nice_name())
 def test_no_leading_slash(self):
     msg = DiagnosticsItem("Status Message")
     self.assertEqual('', msg.get_parent_name())
     self.assertEqual("Status Message", msg.get_nice_name())
 def test_display_list(self):
     msg = DiagnosticsItem(self.status.name)
     msg.update(self.stamp, self.status)
     disp = msg.get_display_list()
     self.assertEqual([('Key 1', 'Value 1'), ('Key 2', 'Value 2')],
                      disp)
 def test_get_parent_name(self):
     msg = DiagnosticsItem("/Other/TouchOSC/Status Message")
     self.assertEqual("/Other/TouchOSC", msg.get_parent_name())
     self.assertEqual("Status Message", msg.get_nice_name())
 def test_length(self):
     msg = DiagnosticsItem(self.status.name)
     msg.update(self.stamp, self.status)
     self.assertEqual(msg.get_length(), 2)
 def test_color(self):
     msg = DiagnosticsItem(self.status.name)
     msg.update(self.stamp, self.status)
     self.assertEqual(msg.get_color(), "green")
Example #7
0
 def test_no_leading_slash(self):
     msg = DiagnosticsItem("Status Message")
     self.assertEqual('', msg.get_parent_name())
     self.assertEqual("Status Message", msg.get_nice_name())
 def test_update(self):
     msg = DiagnosticsItem(self.status.name)
     msg.update(self.stamp, self.status)
     self.assertEqual(msg.stamp, self.stamp)
     self.assertEqual(msg.status, self.status.level)
Example #9
0
 def test_get_parent_name(self):
     msg = DiagnosticsItem("/Other/TouchOSC/Status Message")
     self.assertEqual("/Other/TouchOSC", msg.get_parent_name())
     self.assertEqual("Status Message", msg.get_nice_name())
Example #10
0
 def test_diagnostics(self):
     msg = DiagnosticsItem("/Status Message")
     self.assertEqual('', msg.get_parent_name())
     self.assertEqual("Status Message", msg.get_nice_name())
Example #11
0
 def test_display_list(self):
     msg = DiagnosticsItem(self.status.name)
     msg.update(self.stamp, self.status)
     disp = msg.get_display_list()
     self.assertEqual([('Key 1', 'Value 1'), ('Key 2', 'Value 2')], disp)
Example #12
0
 def test_color(self):
     msg = DiagnosticsItem(self.status.name)
     msg.update(self.stamp, self.status)
     self.assertEqual(msg.get_color(), "green")
Example #13
0
 def test_length(self):
     msg = DiagnosticsItem(self.status.name)
     msg.update(self.stamp, self.status)
     self.assertEqual(msg.get_length(), 2)
Example #14
0
 def test_update(self):
     msg = DiagnosticsItem(self.status.name)
     msg.update(self.stamp, self.status)
     self.assertEqual(msg.stamp, self.stamp)
     self.assertEqual(msg.status, self.status.level)
Example #15
0
 def test_constructor(self):
     msg = DiagnosticsItem(self.status.name)
     self.assertEqual(msg.name, self.status.name)