@@ -365,13 +365,13 @@ def test_deny_length(self):
365365class FeedbackButtonObjectTests (unittest .TestCase ):
366366 def test_basic_json (self ):
367367 feedback_button = FeedbackButtonObject (text = "+1" , value = "positive" )
368- expected = {"text" : PlainTextObject ( text = " +1") , "value" : "positive" }
368+ expected = {"text" : { "emoji" : True , " text" : " +1", "type" : "plain_text" } , "value" : "positive" }
369369 self .assertDictEqual (expected , feedback_button .to_dict ())
370370
371371 def test_with_accessibility_label (self ):
372372 feedback_button = FeedbackButtonObject (text = "+1" , value = "positive" , accessibility_label = "Positive feedback button" )
373373 expected = {
374- "text" : PlainTextObject ( text = " +1") ,
374+ "text" : { "emoji" : True , " text" : " +1", "type" : "plain_text" } ,
375375 "value" : "positive" ,
376376 "accessibility_label" : "Positive feedback button" ,
377377 }
@@ -381,7 +381,7 @@ def test_with_plain_text_object(self):
381381 text_obj = PlainTextObject (text = "-1" , emoji = False )
382382 feedback_button = FeedbackButtonObject (text = text_obj , value = "negative" )
383383 expected = {
384- "text" : PlainTextObject ( text = " -1") ,
384+ "text" : { "emoji" : False , " text" : " -1", "type" : "plain_text" } ,
385385 "value" : "negative" ,
386386 }
387387 self .assertDictEqual (expected , feedback_button .to_dict ())
@@ -399,7 +399,7 @@ def test_parse_from_dict(self):
399399 parsed = FeedbackButtonObject .parse (data )
400400 self .assertIsInstance (parsed , FeedbackButtonObject )
401401 expected = {
402- "text" : PlainTextObject ( text = " +1") ,
402+ "text" : { "emoji" : True , " text" : " +1", "type" : "plain_text" } ,
403403 "value" : "positive" ,
404404 "accessibility_label" : "Positive feedback" ,
405405 }
0 commit comments