@@ -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" : { "type" : "plain_text" , " text" : " +1", "emoji" : True } , "value" : "positive" }
368+ expected = {"text" : PlainTextObject ( text = " +1") , "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" : { "type" : "plain_text" , " text" : " +1", "emoji" : True } ,
374+ "text" : PlainTextObject ( text = " +1") ,
375375 "value" : "positive" ,
376376 "accessibility_label" : "Positive feedback button" ,
377377 }
@@ -380,7 +380,10 @@ def test_with_accessibility_label(self):
380380 def test_with_plain_text_object (self ):
381381 text_obj = PlainTextObject (text = "-1" , emoji = False )
382382 feedback_button = FeedbackButtonObject (text = text_obj , value = "negative" )
383- expected = {"text" : {"type" : "plain_text" , "text" : "-1" , "emoji" : False }, "value" : "negative" }
383+ expected = {
384+ "text" : PlainTextObject (text = "-1" ),
385+ "value" : "negative" ,
386+ }
384387 self .assertDictEqual (expected , feedback_button .to_dict ())
385388
386389 def test_text_length_validation (self ):
@@ -396,7 +399,7 @@ def test_parse_from_dict(self):
396399 parsed = FeedbackButtonObject .parse (data )
397400 self .assertIsInstance (parsed , FeedbackButtonObject )
398401 expected = {
399- "text" : { "type" : "plain_text" , " text" : " +1", "emoji" : True } ,
402+ "text" : PlainTextObject ( text = " +1") ,
400403 "value" : "positive" ,
401404 "accessibility_label" : "Positive feedback" ,
402405 }
0 commit comments