コード例 #1
0
    def test_should_return_value_value_when_value_property_is_called(self):
        # GIVEN
        value = any_value()

        coap_opt = coap.CoapOption(any_coap_option_type(), value)

        # WHEN
        actual_value = coap_opt.value

        # THEN
        self.assertEqual(value, actual_value)
コード例 #2
0
    def test_should_return_type_value_when_type_property_is_called(self):
        # GIVEN
        _type = any_coap_option_type()

        coap_opt = coap.CoapOption(_type, any_value())

        # WHEN
        actual_type = coap_opt.type

        # THEN
        self.assertEqual(_type, actual_type)