Explorar el Código

[impala] Fix test looking for Impala icon

Use regexp in tests for matching white spaces and new lines
Romain Rigaux hace 13 años
padre
commit
abe9be5
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      apps/impala/src/impala/tests.py

+ 3 - 2
apps/impala/src/impala/tests.py

@@ -15,6 +15,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import re
+
 from nose.tools import assert_true, assert_equal, assert_false
 
 from desktop.lib.django_test_util import make_logged_in_client
@@ -26,8 +28,7 @@ class TestImpala:
 
   def test_basic_flow(self):
     response = self.client.get("/impala/")
-    assert_true("""<li id="impalaIcon"
-    class="active""" in response.content, response.content)
+    assert_true(re.search('<li id="impalaIcon"\W+class="active', response.content), response.content)
     assert_true('Query Editor' in response.content)
 
     response = self.client.get("/impala/execute/")