Abstract out common models used in the frontend's models.py so that django is not required to interact with non Django portions of the code.
This includes the enums RebootBefore, RebootAfter and Test.Type
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4280 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/afe/rpc_utils.py b/frontend/afe/rpc_utils.py
index 3e617d5..3942086 100644
--- a/frontend/afe/rpc_utils.py
+++ b/frontend/afe/rpc_utils.py
@@ -7,7 +7,7 @@
import datetime, os, sys
import django.http
-from autotest_lib.frontend.afe import models, model_logic
+from autotest_lib.frontend.afe import models, model_logic, model_attributes
NULL_DATETIME = datetime.datetime.max
NULL_DATE = datetime.date.max
@@ -201,7 +201,7 @@
'tests together (tests %s and %s differ' % (
test1.name, test2.name)})
- is_server = (test_type == models.Test.Types.SERVER)
+ is_server = (test_type == model_attributes.TestTypes.SERVER)
if test_objects:
synch_count = max(test.sync_count for test in test_objects)
else: