Signed-off-by: IWASE Yusuke <[email protected]>
---
 ryu/tests/unit/services/__init__.py                |  0
 ryu/tests/unit/services/protocols/__init__.py      |  0
 ryu/tests/unit/services/protocols/bgp/__init__.py  |  0
 .../unit/services/protocols/bgp/utils/__init__.py  |  0
 .../services/protocols/bgp/utils/test_other.py     | 38 ++++++++++++++++++++++
 5 files changed, 38 insertions(+)
 create mode 100644 ryu/tests/unit/services/__init__.py
 create mode 100644 ryu/tests/unit/services/protocols/__init__.py
 create mode 100644 ryu/tests/unit/services/protocols/bgp/__init__.py
 create mode 100644 ryu/tests/unit/services/protocols/bgp/utils/__init__.py
 create mode 100644 ryu/tests/unit/services/protocols/bgp/utils/test_other.py

diff --git a/ryu/tests/unit/services/__init__.py 
b/ryu/tests/unit/services/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/ryu/tests/unit/services/protocols/__init__.py 
b/ryu/tests/unit/services/protocols/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/ryu/tests/unit/services/protocols/bgp/__init__.py 
b/ryu/tests/unit/services/protocols/bgp/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/ryu/tests/unit/services/protocols/bgp/utils/__init__.py 
b/ryu/tests/unit/services/protocols/bgp/utils/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/ryu/tests/unit/services/protocols/bgp/utils/test_other.py 
b/ryu/tests/unit/services/protocols/bgp/utils/test_other.py
new file mode 100644
index 0000000..5439fbe
--- /dev/null
+++ b/ryu/tests/unit/services/protocols/bgp/utils/test_other.py
@@ -0,0 +1,38 @@
+# Copyright (C) 2016 Nippon Telegraph and Telephone Corporation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import unittest
+import logging
+from nose.tools import eq_
+
+from ryu.services.protocols.bgp.utils import other
+
+LOG = logging.getLogger(__name__)
+
+
+class Test_bgp_utils_other(unittest.TestCase):
+    """
+    Test case for ryu.services.protocols.bgp.utils.other
+    """
+
+    def test_bytes2hex(self):
+        expected_result = '01 02 03 AA BB CC'
+        data = b'\x01\x02\x03\xaa\xbb\xcc'
+        eq_(expected_result, other.bytes2hex(data))
+
+    def test_hex2byte(self):
+        expected_result = b'\x01\x02\x03\xaa\xbb\xcc'
+        data = '01 02 03 AA BB CC'
+        eq_(expected_result, other.hex2byte(data))
-- 
2.7.4


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to