Permalink
Browse files

Changed TestCaseAssert model

Now it's linked to TestCaseStep, instead of TestCase
  • Loading branch information...
1 parent 2984cdc commit c7903ab11e504a811305a45338b5b42e94347cf1 @glyuck glyuck committed Aug 18, 2012
@@ -0,0 +1,82 @@
+# -*- 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):
+ # Adding model 'Params'
+ db.create_table('feditor_params', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ))
+ db.send_create_signal('feditor', ['Params'])
+
+ # Deleting field 'TestCaseAssert.testcase'
+ db.delete_column('feditor_testcaseassert', 'testcase_id')
+
+ # Adding field 'TestCaseAssert.step'
+ db.add_column('feditor_testcaseassert', 'step',
+ self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['feditor.TestCaseStep']),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting model 'Params'
+ db.delete_table('feditor_params')
+
+
+ # User chose to not deal with backwards NULL issues for 'TestCaseAssert.testcase'
+ raise RuntimeError("Cannot reverse this migration. 'TestCaseAssert.testcase' and its values cannot be restored.")
+ # Deleting field 'TestCaseAssert.step'
+ db.delete_column('feditor_testcaseassert', 'step_id')
+
+
+ models = {
+ 'fcore.company': {
+ 'Meta': {'object_name': 'Company'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'slug': ('autoslug.fields.AutoSlugField', [], {'unique_with': '()', 'max_length': '50', 'populate_from': 'None'})
+ },
+ 'feditor.params': {
+ 'Meta': {'object_name': 'Params'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
+ },
+ 'feditor.testcase': {
+ 'Meta': {'object_name': 'TestCase'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['feditor.TestProject']"}),
+ 'slug': ('autoslug.fields.AutoSlugField', [], {'unique_with': '()', 'max_length': '50', 'populate_from': 'None'})
+ },
+ 'feditor.testcaseassert': {
+ 'Meta': {'object_name': 'TestCaseAssert'},
+ 'expression': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'order': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
+ 'step': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['feditor.TestCaseStep']"})
+ },
+ 'feditor.testcasestep': {
+ 'Meta': {'object_name': 'TestCaseStep'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'method': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'order': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
+ 'params': ('fortuitus.feditor.dbfields.ParamsField', [], {}),
+ 'testcase': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['feditor.TestCase']"}),
+ 'url': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ 'feditor.testproject': {
+ 'Meta': {'object_name': 'TestProject'},
+ 'base_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'common_params': ('fortuitus.feditor.dbfields.ParamsField', [], {}),
+ 'company': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['fcore.Company']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'slug': ('autoslug.fields.AutoSlugField', [], {'unique_with': '()', 'max_length': '50', 'populate_from': 'None'})
+ }
+ }
+
+ complete_apps = ['feditor']
@@ -86,7 +86,7 @@ class TestCaseAssert(models.Model):
Contains assertions for a test case step.
"""
- testcase = models.ForeignKey(TestCase)
+ step = models.ForeignKey(TestCaseStep)
order = models.PositiveSmallIntegerField()
expression = models.CharField(max_length=255)

0 comments on commit c7903ab

Please sign in to comment.