Ns descriptor related stuffs. 27/61827/19
authorlaili <lai.li@zte.com.cn>
Wed, 22 Aug 2018 10:52:02 +0000 (18:52 +0800)
committerLi Lai <lai.li@zte.com.cn>
Fri, 24 Aug 2018 06:31:39 +0000 (06:31 +0000)
Fix a bug.

Change-Id: I7ecaef1bfbf8a8c10c2fee8bc70f6ab3bfb7485d
Issue-ID: VFC-1037
Signed-off-by: laili <lai.li@zte.com.cn>
catalog/pub/utils/tests.py

index 0fe8310..73029fa 100644 (file)
@@ -12,6 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import platform
 import unittest
 import mock
 import fileutil
@@ -51,7 +52,10 @@ class UtilsTest(unittest.TestCase):
         fileutil.delete_dirs("abc")
         is_ok, f_name = fileutil.download_file_from_http("1", "abc", "1.txt")
         self.assertTrue(is_ok)
-        self.assertTrue(f_name.endswith("abc/1.txt"))
+        if 'Windows' in platform.system():
+            self.assertTrue(f_name.endswith("abc\\1.txt"))
+        else:
+            self.assertTrue(f_name.endswith("abc/1.txt"))
         fileutil.delete_dirs("abc")
 
     def test_query_job_status(self):