[CORD-3155] Fixing sync and deletion for PortInterfaces
Change-Id: Ic9a5942792cf9e01171cd1ed81b60d331c8ff2c6
diff --git a/xos/synchronizer/steps/test_sync_fabric_port.py b/xos/synchronizer/steps/test_sync_fabric_port.py
index 696a6a7..b0f6886 100644
--- a/xos/synchronizer/steps/test_sync_fabric_port.py
+++ b/xos/synchronizer/steps/test_sync_fabric_port.py
@@ -13,7 +13,7 @@
# limitations under the License.
import unittest
-
+import urllib
import functools
from mock import patch, call, Mock, PropertyMock
import requests_mock
@@ -189,12 +189,15 @@
@requests_mock.Mocker()
def test_delete_port(self, m):
- m.delete("http://onos-fabric:8181/onos/v1/network/configuration/ports/of:1234/1",
- status_code=204)
self.o.switch.ofId = "of:1234"
self.o.portId = "1"
+ key = urllib.quote("of:1234/1", safe='')
+
+ m.delete("http://onos-fabric:8181/onos/v1/network/configuration/ports/%s" % key,
+ status_code=204)
+
with patch.object(Service.objects, "get") as onos_fabric_get:
onos_fabric_get.return_value = self.fabric