From 84dce83860406efd3f6cabba6f74d5ba773f7cdd Mon Sep 17 00:00:00 2001 From: Seth House Date: Thu, 8 Dec 2016 02:07:47 -0700 Subject: [PATCH] Switch type comparison to isinstance --- tests/integration/modules/state.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/integration/modules/state.py b/tests/integration/modules/state.py index 0d6bf0625d..057e2cb1e4 100644 --- a/tests/integration/modules/state.py +++ b/tests/integration/modules/state.py @@ -110,12 +110,10 @@ class StateModuleTest(integration.ModuleCase, sls2 = self.run_function('state.sls', mods='gndn') for state, ret in sls1.items(): - key_type = type(ret['__sls__']) - self.assertTrue(key_type is str or key_type is type(None)) + self.assertTrue(isinstance(ret['__sls__'], type(None))) for state, ret in sls2.items(): - key_type = type(ret['__sls__']) - self.assertTrue(key_type is str or key_type is type(None)) + self.assertTrue(isinstance(ret['__sls__'], str)) def _remove_request_cache_file(self): '''