Browse files

removed unnecessary timestamp fields from Result model. Only looks at…

… results with 'is_latest' flag. New urls can post new testrun with results from apis.
  • Loading branch information...
1 parent bda6088 commit d2da9004f2cda839dc475e4910afda83e8a8ab20 @camd camd committed May 18, 2012
View
48 moztrap/model/core/api.py
@@ -4,6 +4,7 @@
from tastypie import fields
from .models import Product, ProductVersion, ApiKey
+from ..environments.api import EnvironmentResource
from .auth import User
@@ -34,39 +35,50 @@ def is_authorized(self, request, object=None):
-class ProductResource(ModelResource):
-
- class Meta:
- queryset = Product.objects.all()
- list_allowed_methods = ['get']
- fields = ["id", "name", "description", "resource_uri"]
- filtering = {"name": ALL}
-
-
-
class ProductVersionResource(ModelResource):
"""
Fetch the versions for the specified test product
"""
- product = fields.ForeignKey(ProductResource, "product")
-
-
class Meta:
queryset = ProductVersion.objects.all()
list_allowed_methods = ['get']
fields = ["id", "version", "codename", "resource_uri"]
filtering = {
"version": ALL,
- "product": ALL_WITH_RELATIONS,
}
- def dehydrate(self, bundle):
- product_name = bundle.obj.product.name
- bundle.data['product__name'] = product_name
- return bundle
+class ProductResource(ModelResource):
+
+ productversions = fields.ToManyField(
+ ProductVersionResource,
+ "versions",
+ full=True,
+ )
+
+ class Meta:
+ queryset = Product.objects.all()
+ list_allowed_methods = ['get']
+ fields = ["id", "name", "description", "resource_uri"]
+ filtering = {"name": ALL}
+
+
+
+class ProductVersionEnvironmentsResource(ModelResource):
+ """Environments for a specific productversion."""
+ environments = fields.ToManyField(
+ EnvironmentResource,
+ "environments",
+ full=True,
+ )
+
+ class Meta:
+# resource_name="productversion/environments"
+ queryset = ProductVersion.objects.all()
+ list_allowed_methods = ['get']
+ fields = ["id", "version", "codename", "resource_uri"]
View
15 moztrap/model/environments/api.py
@@ -1,12 +1,20 @@
from tastypie import fields
from tastypie.resources import ModelResource, ALL
-from .models import Environment, Element
+from .models import Environment, Element, Category
+class CategoryResource(ModelResource):
+
+ class Meta:
+ queryset = Category.objects.all()
+ fields = ["id", "name"]
+
+
class ElementResource(ModelResource):
+ category = fields.ForeignKey(CategoryResource, "category", full=True)
class Meta:
queryset = Element.objects.all()
fields = ["id", "name", "resource_uri"]
@@ -16,8 +24,11 @@ class Meta:
class EnvironmentResource(ModelResource):
elements = fields.ToManyField(ElementResource, "elements", full=True)
+
class Meta:
queryset = Environment.objects.all()
list_allowed_methods = ['get']
fields = ["id", "resource_uri"]
- filtering = {"elements": ALL}
+ filtering = {"elements": ALL}
+
+
View
8 moztrap/model/execution/admin.py
@@ -28,9 +28,9 @@ class ResultInline(MTStackedInline):
fieldsets = [(None, {"fields": [
"runcaseversion",
("tester", "environment"),
- ("status", "started", "completed"),
+ ("status"),
"comment",
- ("review", "reviewed_on", "reviewed_by"),
+ ("review", "reviewed_by"),
"exists",
]})]
@@ -59,9 +59,9 @@ class ResultAdmin(MTModelAdmin):
fieldsets = [(None, {"fields": [
"runcaseversion",
("tester", "environment"),
- ("status", "started", "completed"),
+ ("status"),
"comment",
- ("review", "reviewed_on", "reviewed_by"),
+ ("review", "reviewed_by"),
]})]
inlines = [StepResultInline]
View
132 moztrap/model/execution/api.py
@@ -7,9 +7,42 @@
from ..core.api import (ProductVersionResource, UserResource,
ReportResultsAuthorization, MTApiKeyAuthentication)
from ..core.auth import User
+from ..core.models import ProductVersion
from ..environments.api import EnvironmentResource
from ..environments.models import Environment
from ..library.api import CaseVersionResource
+from ..library.models import CaseVersion
+
+
+
+class RunCaseVersionResource(ModelResource):
+ """
+ RunCaseVersion represents the connection between a run and a caseversion.
+
+ It is possible to return a result for each runcaseversion. So the result
+ will sit as a peer to the caseversion under the runcaseversion.
+
+ """
+
+ # run = fields.ForeignKey(RunResource, "run")
+ caseversion = fields.ForeignKey(CaseVersionResource, "caseversion", full=True)
+
+ class Meta:
+ queryset = RunCaseVersion.objects.all()
+ list_allowed_methods = ['get']
+ filtering = {
+ "run": ALL_WITH_RELATIONS,
+ "caseversion": ALL_WITH_RELATIONS,
+ }
+ fields = {"id", "run", "run_id"}
+
+
+ def dehydrate(self, bundle):
+
+ # give the id of the run for convenience
+ bundle.data["run_id"] = str(bundle.obj.run.id)
+ return bundle
+
@@ -21,7 +54,15 @@ class RunResource(ModelResource):
"""
productversion = fields.ForeignKey(ProductVersionResource, "productversion")
- environments = fields.ToManyField(EnvironmentResource, "environments", full=True)
+ environments = fields.ToManyField(
+ EnvironmentResource,
+ "environments",
+ full=False,
+ )
+ runcaseversions = fields.ToManyField(
+ RunCaseVersionResource,
+ "runcaseversions",
+ )
class Meta:
queryset = Run.objects.all()
@@ -30,7 +71,6 @@ class Meta:
"id",
"name",
"description",
- "resource_uri",
"status",
"productversion",
"environments",
@@ -40,6 +80,9 @@ class Meta:
"productversion": ALL_WITH_RELATIONS,
"status": "exact",
}
+ authentication = MTApiKeyAuthentication()
+ authorization = ReportResultsAuthorization()
+
def dehydrate(self, bundle):
pv = bundle.obj.productversion
@@ -66,34 +109,73 @@ def dispatch_list(self, request, **kwargs):
return super(RunResource, self).dispatch_list(request, **kwargs)
+ def obj_create(self, bundle, request=None, **kwargs):
+ """Set the created_by field for the run to the request's user"""
-class RunCaseVersionResource(ModelResource):
- """
- RunCaseVersion represents the connection between a run and a caseversion.
+ bundle = super(RunResource, self).obj_create(bundle=bundle, request=request, **kwargs)
+ user = User.objects.get(username=bundle.request.user.username)
+ bundle.obj.created_by = user
+ bundle.obj.save()
+ return bundle
- It is possible to return a result for each runcaseversion. So the result
- will sit as a peer to the caseversion under the runcaseversion.
- """
+ def hydrate_runcaseversions(self, bundle):
- run = fields.ForeignKey(RunResource, "run")
- caseversion = fields.ForeignKey(CaseVersionResource, "caseversion", full=True)
+ """
+ Manually create the test run based on results objects.
- class Meta:
- queryset = RunCaseVersion.objects.all()
- list_allowed_methods = ['get']
- filtering = {
- "run": ALL_WITH_RELATIONS,
- "caseversion": ALL_WITH_RELATIONS,
- }
- fields = {"id", "run", "run_id"}
+ This is necessary because we have special handler methods for
+ setting the statuses which we want to keep DRY.
+ """
+
+ try:
+ run = bundle.obj
+ run.save()
+
+ # walk results
+
+ for result in bundle.data["runcaseversions"]:
+
+ # find caseversion for case
+ cv = CaseVersion.objects.get(
+ productversion=run.productversion,
+ case=result.pop("case"),
+ )
+
+ # create runcaseversion for this run to caseversion
+ rcv, created = RunCaseVersion.objects.get_or_create(
+ run=run,
+ caseversion=cv,
+ )
+
+
+ user = User.objects.get(username=bundle.request.user.username)
+ result["user"] = user
+ result["environment"] = Environment.objects.get(
+ pk=result["environment"])
+
+ # create result via methods on runcaseversion
+ status = result.pop("status")
+ status_methods = {
+ "passed": rcv.finishsucceed,
+ "failed": rcv.finishfail,
+ "invalidated": rcv.finishinvalidate,
+ }
+
+ set_status = status_methods[status]
+ set_status(**result)
+
+ #TODO @@@ Cookbook for Tastypie
+ #don't act on the data in here, we already did. So emptying it.
+ bundle.data["runcaseversions"] = []
+ return bundle
+
+ except Exception as e:
+ raise ValidationError(
+ "bad result object data missing key: {0}".format(e))
- def dehydrate(self, bundle):
- # give the id of the run for convenience
- bundle.data["run_id"] = str(bundle.obj.run.id)
- return bundle
@@ -167,9 +249,9 @@ def obj_create(self, bundle, request=None, **kwargs):
status_methods = {
- "passed": result.finishsucceed,
- "failed": result.finishfail,
- "invalidated": result.finishinvalidate,
+ "passed": rcv.finishsucceed,
+ "failed": rcv.finishfail,
+ "invalidated": rcv.finishinvalidate,
}
set_status = status_methods[status]
View
329 ...l/execution/migrations/0006_auto__del_field_result_started__del_field_result_completed.py
@@ -0,0 +1,329 @@
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Deleting field 'Result.started'
+ db.delete_column('execution_result', 'started')
+
+ # Deleting field 'Result.completed'
+ db.delete_column('execution_result', 'completed')
+
+ def backwards(self, orm):
+ # Adding field 'Result.started'
+ db.add_column('execution_result', 'started',
+ self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Result.completed'
+ db.add_column('execution_result', 'completed',
+ self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True),
+ keep_default=False)
+
+ models = {
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'core.product': {
+ 'Meta': {'ordering': "['name']", 'object_name': 'Product'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'has_team': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'own_team': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'core.productversion': {
+ 'Meta': {'ordering': "['product', 'order']", 'object_name': 'ProductVersion'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'environments': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'productversion'", 'symmetrical': 'False', 'to': "orm['environments.Environment']"}),
+ 'has_team': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'latest': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'own_team': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'product': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'versions'", 'to': "orm['core.Product']"}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'environments.category': {
+ 'Meta': {'ordering': "['name']", 'object_name': 'Category'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+ },
+ 'environments.element': {
+ 'Meta': {'ordering': "['name']", 'object_name': 'Element'},
+ 'category': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'elements'", 'to': "orm['environments.Category']"}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+ },
+ 'environments.environment': {
+ 'Meta': {'object_name': 'Environment'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'elements': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'environments'", 'symmetrical': 'False', 'to': "orm['environments.Element']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'profile': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'environments'", 'null': 'True', 'to': "orm['environments.Profile']"})
+ },
+ 'environments.profile': {
+ 'Meta': {'object_name': 'Profile'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+ },
+ 'execution.result': {
+ 'Meta': {'object_name': 'Result'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'environment': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'results'", 'to': "orm['environments.Environment']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_latest': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'review': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '50', 'db_index': 'True'}),
+ 'reviewed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'reviews'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'reviewed_on': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'runcaseversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'results'", 'to': "orm['execution.RunCaseVersion']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "'assigned'", 'max_length': '50', 'db_index': 'True'}),
+ 'tester': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'results'", 'to': "orm['auth.User']"})
+ },
+ 'execution.run': {
+ 'Meta': {'object_name': 'Run'},
+ 'caseversions': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'runs'", 'symmetrical': 'False', 'through': "orm['execution.RunCaseVersion']", 'to': "orm['library.CaseVersion']"}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'end': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
+ 'environments': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'run'", 'symmetrical': 'False', 'to': "orm['environments.Environment']"}),
+ 'has_team': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ 'own_team': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'productversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runs'", 'to': "orm['core.ProductVersion']"}),
+ 'start': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "'draft'", 'max_length': '30', 'db_index': 'True'}),
+ 'suites': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'runs'", 'symmetrical': 'False', 'through': "orm['execution.RunSuite']", 'to': "orm['library.Suite']"})
+ },
+ 'execution.runcaseversion': {
+ 'Meta': {'ordering': "['order']", 'object_name': 'RunCaseVersion'},
+ 'caseversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runcaseversions'", 'to': "orm['library.CaseVersion']"}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'environments': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'runcaseversion'", 'symmetrical': 'False', 'to': "orm['environments.Environment']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'run': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runcaseversions'", 'to': "orm['execution.Run']"}),
+ 'suites': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'runcaseversions'", 'symmetrical': 'False', 'to': "orm['library.Suite']"})
+ },
+ 'execution.runsuite': {
+ 'Meta': {'ordering': "['order']", 'object_name': 'RunSuite'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'run': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runsuites'", 'to': "orm['execution.Run']"}),
+ 'suite': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runsuites'", 'to': "orm['library.Suite']"})
+ },
+ 'execution.stepresult': {
+ 'Meta': {'object_name': 'StepResult'},
+ 'bug_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'result': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'stepresults'", 'to': "orm['execution.Result']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "'passed'", 'max_length': '50', 'db_index': 'True'}),
+ 'step': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'stepresults'", 'to': "orm['library.CaseStep']"})
+ },
+ 'library.case': {
+ 'Meta': {'object_name': 'Case'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'idprefix': ('django.db.models.fields.CharField', [], {'max_length': '25', 'blank': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'product': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'cases'", 'to': "orm['core.Product']"})
+ },
+ 'library.casestep': {
+ 'Meta': {'ordering': "['caseversion', 'number']", 'object_name': 'CaseStep'},
+ 'caseversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'steps'", 'to': "orm['library.CaseVersion']"}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'expected': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'instruction': ('django.db.models.fields.TextField', [], {}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'number': ('django.db.models.fields.IntegerField', [], {})
+ },
+ 'library.caseversion': {
+ 'Meta': {'ordering': "['case', 'productversion__order']", 'object_name': 'CaseVersion'},
+ 'case': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'versions'", 'to': "orm['library.Case']"}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'environments': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'caseversion'", 'symmetrical': 'False', 'to': "orm['environments.Environment']"}),
+ 'envs_narrowed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'latest': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ 'productversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'caseversions'", 'to': "orm['core.ProductVersion']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "'active'", 'max_length': '30', 'db_index': 'True'}),
+ 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'caseversions'", 'blank': 'True', 'to': "orm['tags.Tag']"})
+ },
+ 'library.suite': {
+ 'Meta': {'object_name': 'Suite'},
+ 'cases': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'suites'", 'symmetrical': 'False', 'through': "orm['library.SuiteCase']", 'to': "orm['library.Case']"}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ 'product': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'suites'", 'to': "orm['core.Product']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "'active'", 'max_length': '30', 'db_index': 'True'})
+ },
+ 'library.suitecase': {
+ 'Meta': {'ordering': "['order']", 'object_name': 'SuiteCase'},
+ 'case': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'suitecases'", 'to': "orm['library.Case']"}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'suite': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'suitecases'", 'to': "orm['library.Suite']"})
+ },
+ 'tags.tag': {
+ 'Meta': {'object_name': 'Tag'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 16, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'product': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Product']", 'null': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['execution']
View
320 moztrap/model/execution/migrations/0007_auto__del_field_result_reviewed_on.py
@@ -0,0 +1,320 @@
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Deleting field 'Result.reviewed_on'
+ db.delete_column('execution_result', 'reviewed_on')
+
+ def backwards(self, orm):
+ # Adding field 'Result.reviewed_on'
+ db.add_column('execution_result', 'reviewed_on',
+ self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True),
+ keep_default=False)
+
+ models = {
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'core.product': {
+ 'Meta': {'ordering': "['name']", 'object_name': 'Product'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'has_team': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'own_team': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'core.productversion': {
+ 'Meta': {'ordering': "['product', 'order']", 'object_name': 'ProductVersion'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'environments': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'productversion'", 'symmetrical': 'False', 'to': "orm['environments.Environment']"}),
+ 'has_team': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'latest': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'own_team': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'product': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'versions'", 'to': "orm['core.Product']"}),
+ 'version': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'environments.category': {
+ 'Meta': {'ordering': "['name']", 'object_name': 'Category'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+ },
+ 'environments.element': {
+ 'Meta': {'ordering': "['name']", 'object_name': 'Element'},
+ 'category': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'elements'", 'to': "orm['environments.Category']"}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+ },
+ 'environments.environment': {
+ 'Meta': {'object_name': 'Environment'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'elements': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'environments'", 'symmetrical': 'False', 'to': "orm['environments.Element']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'profile': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'environments'", 'null': 'True', 'to': "orm['environments.Profile']"})
+ },
+ 'environments.profile': {
+ 'Meta': {'object_name': 'Profile'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+ },
+ 'execution.result': {
+ 'Meta': {'object_name': 'Result'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'environment': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'results'", 'to': "orm['environments.Environment']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_latest': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'review': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '50', 'db_index': 'True'}),
+ 'reviewed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'reviews'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'runcaseversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'results'", 'to': "orm['execution.RunCaseVersion']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "'assigned'", 'max_length': '50', 'db_index': 'True'}),
+ 'tester': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'results'", 'to': "orm['auth.User']"})
+ },
+ 'execution.run': {
+ 'Meta': {'object_name': 'Run'},
+ 'caseversions': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'runs'", 'symmetrical': 'False', 'through': "orm['execution.RunCaseVersion']", 'to': "orm['library.CaseVersion']"}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'end': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
+ 'environments': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'run'", 'symmetrical': 'False', 'to': "orm['environments.Environment']"}),
+ 'has_team': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ 'own_team': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'productversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runs'", 'to': "orm['core.ProductVersion']"}),
+ 'start': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "'draft'", 'max_length': '30', 'db_index': 'True'}),
+ 'suites': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'runs'", 'symmetrical': 'False', 'through': "orm['execution.RunSuite']", 'to': "orm['library.Suite']"})
+ },
+ 'execution.runcaseversion': {
+ 'Meta': {'ordering': "['order']", 'object_name': 'RunCaseVersion'},
+ 'caseversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runcaseversions'", 'to': "orm['library.CaseVersion']"}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'environments': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'runcaseversion'", 'symmetrical': 'False', 'to': "orm['environments.Environment']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'run': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runcaseversions'", 'to': "orm['execution.Run']"}),
+ 'suites': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'runcaseversions'", 'symmetrical': 'False', 'to': "orm['library.Suite']"})
+ },
+ 'execution.runsuite': {
+ 'Meta': {'ordering': "['order']", 'object_name': 'RunSuite'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'run': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runsuites'", 'to': "orm['execution.Run']"}),
+ 'suite': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runsuites'", 'to': "orm['library.Suite']"})
+ },
+ 'execution.stepresult': {
+ 'Meta': {'object_name': 'StepResult'},
+ 'bug_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'result': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'stepresults'", 'to': "orm['execution.Result']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "'passed'", 'max_length': '50', 'db_index': 'True'}),
+ 'step': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'stepresults'", 'to': "orm['library.CaseStep']"})
+ },
+ 'library.case': {
+ 'Meta': {'object_name': 'Case'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'idprefix': ('django.db.models.fields.CharField', [], {'max_length': '25', 'blank': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'product': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'cases'", 'to': "orm['core.Product']"})
+ },
+ 'library.casestep': {
+ 'Meta': {'ordering': "['caseversion', 'number']", 'object_name': 'CaseStep'},
+ 'caseversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'steps'", 'to': "orm['library.CaseVersion']"}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'expected': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'instruction': ('django.db.models.fields.TextField', [], {}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'number': ('django.db.models.fields.IntegerField', [], {})
+ },
+ 'library.caseversion': {
+ 'Meta': {'ordering': "['case', 'productversion__order']", 'object_name': 'CaseVersion'},
+ 'case': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'versions'", 'to': "orm['library.Case']"}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'environments': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'caseversion'", 'symmetrical': 'False', 'to': "orm['environments.Environment']"}),
+ 'envs_narrowed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'latest': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ 'productversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'caseversions'", 'to': "orm['core.ProductVersion']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "'active'", 'max_length': '30', 'db_index': 'True'}),
+ 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'caseversions'", 'blank': 'True', 'to': "orm['tags.Tag']"})
+ },
+ 'library.suite': {
+ 'Meta': {'object_name': 'Suite'},
+ 'cases': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'suites'", 'symmetrical': 'False', 'through': "orm['library.SuiteCase']", 'to': "orm['library.Case']"}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ 'product': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'suites'", 'to': "orm['core.Product']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "'active'", 'max_length': '30', 'db_index': 'True'})
+ },
+ 'library.suitecase': {
+ 'Meta': {'ordering': "['order']", 'object_name': 'SuiteCase'},
+ 'case': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'suitecases'", 'to': "orm['library.Case']"}),
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'suite': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'suitecases'", 'to': "orm['library.Suite']"})
+ },
+ 'tags.tag': {
+ 'Meta': {'object_name': 'Tag'},
+ 'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 17, 0, 0)'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'product': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Product']", 'null': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['execution']
View
123 moztrap/model/execution/models.py
@@ -253,6 +253,64 @@ def testers(self):
pk__in=self.results.values_list("tester", flat=True).distinct())
+ def start(self, environment=None, user=None):
+ """Mark this result started."""
+ Result.objects.create(
+ runcaseversion=self,
+ tester=user,
+ environment=environment,
+ status=Result.STATUS.started,
+ user=user
+ )
+
+
+ def finishsucceed(self, environment=None, user=None):
+ """Create a passed result for this case."""
+ Result.objects.create(
+ runcaseversion=self,
+ tester=user,
+ environment=environment,
+ status=Result.STATUS.passed,
+ user=user
+ )
+
+
+ def finishinvalidate(self, environment=None, comment="", user=None):
+ """Create an invalidated result for this case."""
+ Result.objects.create(
+ runcaseversion=self,
+ tester=user,
+ environment=environment,
+ status=Result.STATUS.invalidated,
+ comment=comment,
+ user=user,
+ )
+
+
+ def finishfail(self, environment=None, comment="", stepnumber=None, bug="", user=None):
+ """Create a failed result for this case."""
+ result = Result.objects.create(
+ runcaseversion=self,
+ tester=user,
+ environment=environment,
+ status=Result.STATUS.failed,
+ comment=comment,
+ user=user,
+ )
+ if stepnumber:
+ try:
+ step = self.caseversion.steps.get(
+ number=stepnumber)
+ except CaseStep.DoesNotExist:
+ pass
+ else:
+ stepresult = StepResult(result=result, step=step)
+ stepresult.status = StepResult.STATUS.failed
+ stepresult.bug_url = bug
+ stepresult.save(user=user)
+ self.save(force_update=True, user=user)
+
+
class RunSuite(MTModel):
"""
@@ -290,14 +348,11 @@ class Result(MTModel):
environment = models.ForeignKey(Environment, related_name="results")
status = models.CharField(
max_length=50, db_index=True, choices=STATUS, default=STATUS.assigned)
- started = models.DateTimeField(blank=True, null=True)
- completed = models.DateTimeField(blank=True, null=True)
comment = models.TextField(blank=True)
is_latest = models.BooleanField(default=True)
review = models.CharField(
max_length=50, db_index=True, choices=REVIEW, default=REVIEW.pending)
- reviewed_on = models.DateTimeField(blank=True, null=True)
reviewed_by = models.ForeignKey(
User, related_name="reviews", blank=True, null=True)
@@ -320,68 +375,8 @@ def bug_urls(self):
)
- def start(self, user=None):
- """Mark this result started."""
- self.status = self.STATUS.started
- self.started = utcnow()
- self.save(force_update=True, user=user)
-
-
- def finishsucceed(self, user=None):
- """Mark this result passed."""
- self.status = self.STATUS.passed
- self.completed = utcnow()
- if not self.started:
- self.started = utcnow()
- self.save(force_update=True, user=user)
-
-
- def finishinvalidate(self, comment="", user=None):
- """Mark this result invalidated."""
- self.status = self.STATUS.invalidated
- self.comment = comment
- self.completed = utcnow()
- if not self.started:
- self.started = utcnow()
- self.save(force_update=True, user=user)
-
-
- def finishfail(self, comment="", stepnumber=None, bug="", user=None):
- """Mark this result failed."""
- self.status = self.STATUS.failed
- self.completed = utcnow()
- if not self.started:
- self.started = utcnow()
- self.comment = comment
- if stepnumber:
- try:
- step = self.runcaseversion.caseversion.steps.get(
- number=stepnumber)
- except CaseStep.DoesNotExist:
- pass
- else:
- try:
- stepresult = self.stepresults.get(step=step)
- except StepResult.DoesNotExist:
- stepresult = StepResult(result=self, step=step)
- stepresult.status = StepResult.STATUS.failed
- stepresult.bug_url = bug
- stepresult.save(user=user)
- self.save(force_update=True, user=user)
-
-
- def restart(self, user=None):
- """Restart this test, clearing any previous result."""
- self.stepresults.all().delete()
- self.status = self.STATUS.started
- self.started = utcnow()
- self.completed = None
- self.comment = ""
- self.save(force_update=True, user=user)
-
-
def save(self, *args, **kwargs):
- if True: #self.pk is None:
+ if self.pk is None:
self.set_latest()
super(Result, self).save(*args, **kwargs)
View
13 moztrap/model/library/api.py
@@ -4,25 +4,32 @@
from .models import CaseVersion, Case
from ..environments.api import EnvironmentResource
+from ..core.api import ProductVersionResource
class CaseResource(ModelResource):
class Meta:
queryset = Case.objects.all()
+ fields= ["id"]
class CaseVersionResource(ModelResource):
- case = fields.ForeignKey(CaseResource, "case")
+ case = fields.ForeignKey(CaseResource, "case", full=True)
environments = fields.ToManyField(EnvironmentResource, "environments")
+ productversion = fields.ForeignKey(ProductVersionResource, "productversion")
+
class Meta:
queryset = CaseVersion.objects.all()
list_allowed_methods = ['get']
- fields = ["id", "name", "description", "resource_uri", "case"]
- filtering = {"environments": ALL}
+ fields = ["id", "name", "description", "case"]
+ filtering = {
+ "environments": ALL,
+ "productversion": ALL,
+ }
View
2 moztrap/view/api/urls.py
@@ -18,8 +18,10 @@
v1_api.register(library.CaseVersionResource())
v1_api.register(environments.EnvironmentResource())
v1_api.register(environments.ElementResource())
+v1_api.register(environments.CategoryResource())
v1_api.register(core.ProductResource())
v1_api.register(core.ProductVersionResource())
+v1_api.register(core.ProductVersionEnvironmentsResource())
v1_api.register(core.UserResource())
urlpatterns = patterns(
View
22 moztrap/view/runtests/templatetags/execution.py
@@ -35,25 +35,21 @@ def render_tag(self, context, runcaseversion, user, environment, varname):
result_kwargs = dict(
environment=environment,
tester=user,
- runcaseversion=runcaseversion
+ runcaseversion=runcaseversion,
+ is_latest=True,
)
try:
result = model.Result.objects.get(**result_kwargs)
except model.Result.DoesNotExist:
result = model.Result(**result_kwargs)
except model.Result.MultipleObjectsReturned:
- dupes = model.Result.objects.filter(**result_kwargs).order_by(
- "-modified_on")
- incomplete_states = set(
- [model.Result.STATUS.assigned, model.Result.STATUS.started])
- # prioritize keeping completed results
- candidates = [r for r in dupes if r.status not in incomplete_states]
- if not candidates:
- candidates = list(dupes)
- # keep the last-modified result of the prioritized set
- result = candidates[0]
- # do not delete the dupes. just allow the view to also show only
- # the latest result.
+ # find the latest one and set it to latest, which will set all
+ # others to is_latest=False
+ latest = model.Result.objects.filter(**result_kwargs).order_by(
+ "-modified_on")[0]
+ latest.set_latest()
+ latest.save()
+
context[varname] = result
return u""
View
25 moztrap/view/runtests/views.py
@@ -82,7 +82,7 @@ def set_environment(request, run_id):
"finishsucceed": {},
"finishinvalidate": {"comment": ""},
"finishfail": {"stepnumber": None, "comment": "", "bug": ""},
- "restart": {},
+ "start": {},
}
@@ -103,18 +103,17 @@ def run(request, run_id, env_id):
"Please select a different test run.")
return redirect("runtests")
- # if an environment isn't specified in the url, then ask the user for one
+ # if the environment specified in the URL doesn't exist for this run,
+ # then ask the user to specify one that does.
try:
environment = run.environments.get(pk=env_id)
except model.Environment.DoesNotExist:
return redirect("runtests_environment", run_id=run_id)
if request.method == "POST":
- """
- Based on this action, create a new Result object with the values we get from the post.
-
+ # Based on this action, create a new Result object with the values we
+ # get from the post.
- """
prefix = "action-"
while True:
rcv = None
@@ -150,14 +149,14 @@ def run(request, run_id, env_id):
except KeyError:
pass
- result = model.Result.objects.create(
- runcaseversion=rcv,
- tester=request.user,
- environment=environment,
- user=request.user,
- **defaults)
+ # put the values specific to this run
+ defaults.update({
+ "environment": environment,
+ "user": request.user,
+ })
+
-# getattr(result, action)(**defaults)
+ getattr(rcv, action)(**defaults)
break
if request.is_ajax():
View
2 templates/runtests/list/_runtest_list_item.html
@@ -19,7 +19,7 @@
{% if result.status == result.STATUS.passed or result.status == result.STATUS.invalidated or result.status == result.STATUS.failed %}
<form method="post" id="restart-form-{{ runcaseversion.id }}" class="restart">
{% csrf_token %}
- <button class="action-restart" value="{{ runcaseversion.id }}" name="action-restart" title="restart '{{ caseversion.name }}'">restart</button>
+ <button class="action-restart" value="{{ runcaseversion.id }}" name="action-start" title="restart '{{ caseversion.name }}'">restart</button>
</form>
{% endif %}
View
0 tests/model/core/api/__init__.py
No changes.
View
30 tests/model/core/api/test_product.py
@@ -0,0 +1,30 @@
+"""
+Tests for ProductResource api.
+
+"""
+
+from tests import case
+
+
+
+class ProductResourceTest(case.api.ApiTestCase):
+
+ @property
+ def factory(self):
+ """The model factory for this object."""
+ return self.F.ProductFactory
+
+
+ @property
+ def resource_name(self):
+ return "product"
+
+
+ def test_product(self):
+ """Get a list of existing products and their versions"""
+ assert False, "needs impl"
+
+
+ def test_product_filter_name(self):
+ """Get a products and its versions, filtered by product name"""
+ assert False, "needs impl"
View
86 tests/model/execution/api/test_result.py
@@ -0,0 +1,86 @@
+"""
+Tests for ResultResource api.
+
+"""
+
+from tests import case
+
+
+
+class ResultResourceTest(case.api.ApiTestCase):
+
+ @property
+ def factory(self):
+ """The model factory for this object."""
+ return self.F.RunCaseVersionFactory
+
+
+ @property
+ def resource_name(self):
+ return "result"
+
+
+ def test_submit_results(self):
+ """Get a list of existing test runs"""
+ r1 = self.F.RunFactory.create(name="RunA")
+
+ c1 = self.F.CaseVersionFactory.create(name="Case1", description="ab")
+ c2 = self.F.CaseVersionFactory.create(name="Case2", description="cd")
+
+ rcv1 = self.factory.create(caseversion=c1, run=r1)
+ rcv2 = self.factory.create(caseversion=c2, run=r1)
+
+ res = self.get_list()
+ self.assertEqual(res.status_int, 200)
+
+ act = res.json
+
+ act_meta = act["meta"]
+ exp_meta = {
+ "limit" : 20,
+ "next" : None,
+ "offset" : 0,
+ "previous" : None,
+ "total_count" : 2,
+ }
+
+ self.assertEquals(act_meta, exp_meta)
+
+ act_objects = act["objects"]
+ exp_objects = []
+ for rcv in [rcv1, rcv2]:
+ cv = rcv.caseversion
+
+ exp_objects.append({
+ u"caseversion": {
+ u"case": unicode(self.get_detail_uri("case",cv.case.id)),
+ u"description": unicode(cv.description),
+ u'environments': [],
+ u"id": unicode(cv.id),
+ u"name": unicode(cv.name),
+ u"resource_uri": unicode(self.get_detail_uri("caseversion",cv.id)),
+ },
+ u"id": unicode(rcv.id),
+ u"run_id": unicode(rcv.run.id),
+ u"run": unicode(self.get_detail_uri("run",rcv.run.id)),
+ u"resource_uri": unicode(self.get_detail_uri("runcaseversion",rcv.id)),
+ })
+
+ self.maxDiff = None
+ self.assertEqual(exp_objects, act_objects)
+
+
+ def test_runcaseversion_by_id(self):
+ """Get a single test run, by id"""
+ r = self.F.RunFactory.create(name="RunA")
+ cv = self.F.CaseVersionFactory.create(name="Case1")
+ rcv = self.factory.create(caseversion=cv, run=r)
+
+ res = self.get_detail(rcv.id)
+ self.assertEqual(res.status_int, 200, res)
+
+ act = res.json
+ self.assertEqual(
+ unicode(self.get_detail_uri("runcaseversion", rcv.id)),
+ act["resource_uri"],
+ )
View
2 tests/model/execution/api/test_runcaseversion.py
@@ -1,5 +1,5 @@
"""
-Tests for RunResource api.
+Tests for RunCaseVersionResource api.
"""
View
272 tests/model/execution/models/test_result.py
@@ -47,265 +47,29 @@ def test_bug_urls(self):
)
- def test_start(self):
- """Start method marks status started and sets started timestamp."""
- r = self.F.ResultFactory.create()
-
- with patch("moztrap.model.execution.models.utcnow") as mock_utcnow:
- mock_utcnow.return_value = datetime(2012, 2, 3)
- r.start()
-
- r = self.refresh(r)
- self.assertEqual(r.status, "started")
- self.assertEqual(r.started, datetime(2012, 2, 3))
-
-
- def test_start_sets_modified_user(self):
- """Start method can set modified-by user."""
- r = self.F.ResultFactory.create()
- u = self.F.UserFactory.create()
-
- r.start(user=u)
-
- self.assertEqual(self.refresh(r).modified_by, u)
-
-
- def test_finishsucceed(self):
- """Finishsucceed marks status passed and sets completed timestamp."""
- r = self.F.ResultFactory.create(
- status="started", started=datetime(2012, 2, 2))
-
- with patch("moztrap.model.execution.models.utcnow") as mock_utcnow:
- mock_utcnow.return_value = datetime(2012, 2, 3)
- r.finishsucceed()
-
- r = self.refresh(r)
- self.assertEqual(r.status, "passed")
- self.assertEqual(r.started, datetime(2012, 2, 2))
- self.assertEqual(r.completed, datetime(2012, 2, 3))
-
-
- def test_finishsucceed_not_started(self):
- """Finishsucceed w/out start also sets started timestamp."""
- r = self.F.ResultFactory.create(status="assigned")
-
- with patch("moztrap.model.execution.models.utcnow") as mock_utcnow:
- mock_utcnow.return_value = datetime(2012, 2, 3)
- r.finishsucceed()
-
- r = self.refresh(r)
- self.assertEqual(r.status, "passed")
- self.assertEqual(r.started, datetime(2012, 2, 3))
- self.assertEqual(r.completed, datetime(2012, 2, 3))
-
-
- def test_finishsucceed_sets_modified_user(self):
- """Finishsucceed method can set modified-by user."""
- r = self.F.ResultFactory.create(status="started")
- u = self.F.UserFactory.create()
-
- r.finishsucceed(user=u)
-
- self.assertEqual(self.refresh(r).modified_by, u)
-
-
- def test_finishinvalidate(self):
- """Finishinvalidate sets status invalidated and completed timestamp."""
- r = self.F.ResultFactory.create(
- status="started", started=datetime(2012, 2, 2))
-
- with patch("moztrap.model.execution.models.utcnow") as mock_utcnow:
- mock_utcnow.return_value = datetime(2012, 2, 3)
- r.finishinvalidate()
-
- r = self.refresh(r)
- self.assertEqual(r.status, "invalidated")
- self.assertEqual(r.started, datetime(2012, 2, 2))
- self.assertEqual(r.completed, datetime(2012, 2, 3))
-
-
- def test_finishinvalidate_not_started(self):
- """Finishinvalidate w/out start also sets started timestamp."""
- r = self.F.ResultFactory.create(status="assigned")
-
- with patch("moztrap.model.execution.models.utcnow") as mock_utcnow:
- mock_utcnow.return_value = datetime(2012, 2, 3)
- r.finishinvalidate()
-
- r = self.refresh(r)
- self.assertEqual(r.status, "invalidated")
- self.assertEqual(r.started, datetime(2012, 2, 3))
- self.assertEqual(r.completed, datetime(2012, 2, 3))
-
-
- def test_finishinvalidate_sets_modified_user(self):
- """Finishinvalidate method can set modified-by user."""
- r = self.F.ResultFactory.create(status="started")
+ def test_save_old_result_doesnt_become_latest(self):
+ """Finishsucceed marks status passed."""
+ envs = self.F.EnvironmentFactory.create_full_set(
+ {"OS": ["OS X"], "Language": ["English"]})
+ run = self.F.RunFactory.create(environments=envs)
+ rcv = self.F.RunCaseVersionFactory.create(run=run)
u = self.F.UserFactory.create()
- r.finishinvalidate(user=u)