Example #1
0
 def test_parse_full_status(self):
     self.assertEqual(
         {
             "status_emoji": ":office:",
             "status_text": "In office"
         },
         messaging.parse_status_update("/status :office: In office"),
     )
Example #2
0
 def test_parse_clear_status(self):
     self.assertEqual(
         {
             "status_emoji": None,
             "status_text": ""
         },
         messaging.parse_status_update("/status clear"),
     )
Example #3
0
 def test_parse_no_text_status(self):
     self.assertEqual(
         {
             "status_emoji": ":office:",
             "status_text": None
         },
         messaging.parse_status_update("/status :office:"),
     )
Example #4
0
 def test_parse_no_emoji_status(self):
     self.assertEqual(
         {
             "status_emoji": ":speech_balloon:",
             "status_text": "At home"
         },
         messaging.parse_status_update("/status At home"),
     )
Example #5
0
 def test_parse_empty_status(self):
     self.assertEqual(
         None,
         messaging.parse_status_update("/status"),
     )