Beispiel #1
0
    def test_msg_str_attr(self):
        class Check(object):
            check = 'msg_str_attr_test'

        c = Check()
        buf = ''

        res = ofproto_parser.msg_str_attr(c, buf, ('check', ))
        str_ = str(res)
        str_ = str_.rsplit()
        eq_('check', str_[0])
        eq_('msg_str_attr_test', str_[1])
    def test_msg_str_attr(self):
        class Check(object):
            check = 'msg_str_attr_test'

        c = Check()
        buf = ''

        res = ofproto_parser.msg_str_attr(c, buf, ('check',))
        str_ = str(res)
        str_ = str_.rsplit()
        eq_('check', str_[0])
        eq_('msg_str_attr_test', str_[1])