(self)
| 375 | self.assertDictEqual(input, ActionsBlock(**input).to_dict()) |
| 376 | |
| 377 | def test_json(self): |
| 378 | self.elements = [ |
| 379 | ButtonElement(text="Click me", action_id="reg_button", value="1"), |
| 380 | LinkButtonElement(text="URL Button", url="http://google.com"), |
| 381 | ] |
| 382 | self.dict_elements = [] |
| 383 | for e in self.elements: |
| 384 | self.dict_elements.append(e.to_dict()) |
| 385 | |
| 386 | self.assertDictEqual( |
| 387 | {"elements": self.dict_elements, "type": "actions"}, |
| 388 | ActionsBlock(elements=self.elements).to_dict(), |
| 389 | ) |
| 390 | with self.assertRaises(SlackObjectFormationError): |
| 391 | ActionsBlock(elements=self.elements * 13).to_dict() |
| 392 | |
| 393 | |
| 394 | # ---------------------------------------------- |
nothing calls this directly
no test coverage detected