Преглед на файлове

[beeswax] Make create database test more robust

Romain Rigaux преди 12 години
родител
ревизия
3d0be8a8a9
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 6 1
      apps/beeswax/src/beeswax/tests.py

+ 6 - 1
apps/beeswax/src/beeswax/tests.py

@@ -1098,7 +1098,12 @@ for x in sys.stdin:
       'create': 'Create database',
       'use_default_location': True,
     }, follow=True)
-    assert_equal_mod_whitespace("CREATE DATABASE my_db COMMENT \"foo\"", resp.context['query'].query, resp.content)
+
+    if "watch_wait.mako" in resp.template:
+      assert_equal_mod_whitespace("CREATE DATABASE my_db COMMENT \"foo\"", resp.context['query'].query, resp.content)
+    else:
+      # Create was fast
+      assert_true('databases.mako' in resp.template, resp.template)
 
     resp = wait_for_query_to_finish(self.client, resp, max=180.0)
     assert_true('my_db' in resp.context['databases'], resp)