summaryrefslogtreecommitdiff
path: root/indra/viewer_components/manager/tests/test_convert_version_file_style.py
diff options
context:
space:
mode:
Diffstat (limited to 'indra/viewer_components/manager/tests/test_convert_version_file_style.py')
-rw-r--r--indra/viewer_components/manager/tests/test_convert_version_file_style.py55
1 files changed, 55 insertions, 0 deletions
diff --git a/indra/viewer_components/manager/tests/test_convert_version_file_style.py b/indra/viewer_components/manager/tests/test_convert_version_file_style.py
new file mode 100644
index 0000000000..d700f91b84
--- /dev/null
+++ b/indra/viewer_components/manager/tests/test_convert_version_file_style.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+
+# $LicenseInfo:firstyear=2016&license=internal$
+#
+# Copyright (c) 2016, Linden Research, Inc.
+#
+# The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
+# this source code is governed by the Linden Lab Source Code Disclosure
+# Agreement ("Agreement") previously entered between you and Linden
+# Lab. By accessing, using, copying, modifying or distributing this
+# software, you acknowledge that you have been informed of your
+# obligations under the Agreement and agree to abide by those obligations.
+#
+# ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+# WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+# COMPLETENESS OR PERFORMANCE.
+# $/LicenseInfo$
+
+"""
+@file test_convert_version_file_style.py
+@author coyot
+@date 2016-06-01
+"""
+
+from nose.tools import assert_equal
+
+import update_manager
+
+def test_normal_form():
+ version = '1.2.3.456789'
+ golden = '1_2_3_456789'
+ converted = update_manager.convert_version_file_style(version)
+
+ assert_equal(golden, converted)
+
+def test_short_form():
+ version = '1.23'
+ golden = '1_23'
+ converted = update_manager.convert_version_file_style(version)
+
+ assert_equal(golden, converted)
+
+def test_idempotent():
+ version = '123'
+ golden = '123'
+ converted = update_manager.convert_version_file_style(version)
+
+ assert_equal(golden, converted)
+
+def test_none():
+ version = None
+ golden = None
+ converted = update_manager.convert_version_file_style(version)
+
+ assert_equal(golden, converted) \ No newline at end of file