summaryrefslogtreecommitdiff
path: root/indra/viewer_components/manager/tests/test_convert_version_file_style.py
diff options
context:
space:
mode:
authorGlenn Glazer <coyot@lindenlab.com>2016-07-13 07:36:12 -0700
committerGlenn Glazer <coyot@lindenlab.com>2016-07-13 07:36:12 -0700
commit9c2633cba85f8dae95ff2b748a027dcfb7729848 (patch)
treecfc9a942813d898dfe61378b5614109d262c9817 /indra/viewer_components/manager/tests/test_convert_version_file_style.py
parent7ce516f004835277860043a6c8219fd8b68df148 (diff)
SL-323: adding in unit tests
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