Hi,
On 2017年05月23日 16:05, IWAMOTO Toshihiro wrote: > Signed-off-by: IWAMOTO Toshihiro <iwam...@valinux.co.jp> > --- > ryu/tests/unit/lib/test_ofctl_string.py | 157 > ++++++++++++++++++++++++++++++++ > 1 file changed, 157 insertions(+) > create mode 100644 ryu/tests/unit/lib/test_ofctl_string.py > > diff --git a/ryu/tests/unit/lib/test_ofctl_string.py > b/ryu/tests/unit/lib/test_ofctl_string.py > ...(snip)... > + > + > +class FakeDatapath(object): > + def __init__(self, ofp, ofpp): > + self.ofproto = ofp > + self.ofproto_parser = ofpp > + > + > +class Test_OfctlString(unittest.TestCase): > + """Test cases for ryu.ofproto.ofp_instruction_from_str. > + """ > + > + def __init__(self, methodName): > + print('init %s' % methodName) > + self.fake_dp_of15 = FakeDatapath(ofproto_v1_5, ofproto_v1_5_parser) FakeDatapath can be replaced with "ofproto_protocol.ProtocolDesc"? >>> from ryu.ofproto.ofproto_protocol import ProtocolDesc >>> from ryu.ofproto import ofproto_v1_5 >>> dp = ProtocolDesc(ofproto_v1_5.OFP_VERSION) >>> dp.ofproto <module 'ryu.ofproto.ofproto_v1_5' from '...(snip).../ryu/ofproto/ofproto_v1_5.py'> Thanks, Iwase ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel