diff options
author | shangxdy <shang.xiaodong@zte.com.cn> | 2017-02-26 00:49:42 +0800 |
---|---|---|
committer | shangxdy <shang.xiaodong@zte.com.cn> | 2017-02-26 00:58:41 +0800 |
commit | 406214e5ca40ad57a1c40e4a8454336f6a26cac2 (patch) | |
tree | c07fa0c0a66716351a367d1959415584fb73bab1 /tosca2heat/tosca-parser/toscaparser/tests/test_scalarunit.py | |
parent | 0504c523da459a48721fef74216125d83a4e057d (diff) |
Sync upstream code
Sync upstream project of tosca-parser
Change-Id: Ic707844203ea05007b3c02e9dcadb52389eb3149
JIRA:PARSER-118
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/tests/test_scalarunit.py')
-rw-r--r-- | tosca2heat/tosca-parser/toscaparser/tests/test_scalarunit.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/test_scalarunit.py b/tosca2heat/tosca-parser/toscaparser/tests/test_scalarunit.py index fcd1c83..09a24b6 100644 --- a/tosca2heat/tosca-parser/toscaparser/tests/test_scalarunit.py +++ b/tosca2heat/tosca-parser/toscaparser/tests/test_scalarunit.py @@ -243,7 +243,7 @@ class GetNumFromScalarUnitSizeNegative(TestCase): (ScalarUnit_Size(self.InputMemSize). get_num_from_scalar_unit(self.UserInputUnit)) except Exception as error: - self.assertTrue(isinstance(error, ValueError)) + self.assertIsInstance(error, ValueError) self.assertEqual(_('The unit "qB" is not valid. Valid units are ' '"[\'B\', \'GB\', \'GiB\', \'KiB\', \'MB\', ' '\'MiB\', \'TB\', \'TiB\', \'kB\']".'), @@ -260,7 +260,7 @@ class GetNumFromScalarUnitFrequencyNegative(TestCase): (ScalarUnit_Frequency(self.InputFrequency). get_num_from_scalar_unit(self.UserInputUnit)) except Exception as error: - self.assertTrue(isinstance(error, ValueError)) + self.assertIsInstance(error, ValueError) self.assertEqual(_('The unit "Jz" is not valid. Valid units are ' '"[\'GHz\', \'Hz\', \'MHz\', \'kHz\']".'), error.__str__()) @@ -276,7 +276,7 @@ class GetNumFromScalarUnitTimeNegative(TestCase): (ScalarUnit_Time(self.InputTime). get_num_from_scalar_unit(self.UserInputUnit)) except Exception as error: - self.assertTrue(isinstance(error, ValueError)) + self.assertIsInstance(error, ValueError) self.assertEqual(_('"Jz" is not a valid scalar-unit.'), error.__str__()) |