コード例 #1
0
    def assert_attribute(self, expected, attribute, **data):
        payload = ConfirmationPayload(data)
        result = getattr(payload, attribute)

        self.assertEqual(
            expected, result,
            '{attribute} not equal to {expected} but {result}'.format(
                attribute=attribute, expected=expected, result=result))
コード例 #2
0
 def test_get_item(self):
     payload = ConfirmationPayload(CONFIRMATION_DATA)
     for key, value in CONFIRMATION_DATA.items():
         self.assertEqual(value, payload[key])
コード例 #3
0
    def test_payload(self):
        payload = ConfirmationPayload(CONFIRMATION_DATA)

        self.assertEqual(payload.data, CONFIRMATION_DATA)