summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_files/migrations/0014_auto__add_field_file_requested_operation_type__add_field_file_organiza.py3
-rw-r--r--archaeological_operations/migrations/0001_initial.py3
-rw-r--r--archaeological_operations/tests.py26
-rw-r--r--archaeological_operations/views.py13
-rw-r--r--ishtar_common/migrations/0058_generate_title.py1
-rw-r--r--ishtar_common/migrations/0062_remove_ishtar_local_prefix.py1
6 files changed, 41 insertions, 6 deletions
diff --git a/archaeological_files/migrations/0014_auto__add_field_file_requested_operation_type__add_field_file_organiza.py b/archaeological_files/migrations/0014_auto__add_field_file_requested_operation_type__add_field_file_organiza.py
index 6855d8198..aeb1faec1 100644
--- a/archaeological_files/migrations/0014_auto__add_field_file_requested_operation_type__add_field_file_organiza.py
+++ b/archaeological_files/migrations/0014_auto__add_field_file_requested_operation_type__add_field_file_organiza.py
@@ -6,6 +6,7 @@ from django.db import models
class Migration(SchemaMigration):
+ depends_on = (('archaeological_operations', '0001_initial.py'), )
def forwards(self, orm):
# Adding field 'File.requested_operation_type'
@@ -402,4 +403,4 @@ class Migration(SchemaMigration):
}
}
- complete_apps = ['archaeological_files'] \ No newline at end of file
+ complete_apps = ['archaeological_files']
diff --git a/archaeological_operations/migrations/0001_initial.py b/archaeological_operations/migrations/0001_initial.py
index 2039268aa..c5b4619ab 100644
--- a/archaeological_operations/migrations/0001_initial.py
+++ b/archaeological_operations/migrations/0001_initial.py
@@ -6,6 +6,7 @@ from django.db import models
class Migration(SchemaMigration):
+ depends_on = (('archaeological_files', '0001_initial.py'), )
def forwards(self, orm):
# Adding model 'OperationType'
@@ -651,4 +652,4 @@ class Migration(SchemaMigration):
}
}
- complete_apps = ['archaeological_operations'] \ No newline at end of file
+ complete_apps = ['archaeological_operations']
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index 316e3c897..2aa64ed15 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -697,6 +697,32 @@ class OperationWizardCreationTest(WizardTest, OperationInitTest, TestCase):
self.operation_number + 1)
+class OperationWizardDeleteTest(OperationWizardCreationTest):
+ fixtures = OperationWizardCreationTest.fixtures
+ url_name = 'operation_deletion'
+ wizard_name = 'operation_deletion_wizard'
+ steps = views.operation_deletion_steps
+ form_datas = [
+ FormData(
+ "Wizard deletion test",
+ form_datas={
+ 'selec-operation_deletion': {'pk': None},
+ }
+ )
+ ]
+
+ def pre_wizard(self):
+ self.ope = self.get_default_operation(force=True)
+ self.form_datas[0].form_datas['selec-operation_deletion']['pk'] = \
+ self.ope.pk
+ self.operation_number = models.Operation.objects.count()
+ super(OperationWizardDeleteTest, self).pre_wizard()
+
+ def post_wizard(self):
+ self.assertEqual(self.operation_number - 1,
+ models.Operation.objects.count())
+
+
class OperationWizardClosingTest(OperationWizardCreationTest):
fixtures = OperationWizardCreationTest.fixtures
url_name = 'operation_closing'
diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py
index 7a9c7329b..005fae0db 100644
--- a/archaeological_operations/views.py
+++ b/archaeological_operations/views.py
@@ -163,8 +163,8 @@ def dashboard_operation(request, *args, **kwargs):
return render_to_response('ishtar/dashboards/dashboard_operation.html',
dct, context_instance=RequestContext(request))
-operation_search_wizard = SearchWizard.as_view([
- ('general-operation_search', OperationFormSelection)],
+operation_search_wizard = SearchWizard.as_view(
+ [('general-operation_search', OperationFormSelection)],
label=_(u"Operation search"),
url_name='operation_search',)
@@ -276,9 +276,14 @@ operation_closing_wizard = OperationClosingWizard.as_view(
label=_(u"Operation closing"),
url_name='operation_closing',)
-operation_deletion_wizard = OperationDeletionWizard.as_view([
+
+operation_deletion_steps = [
('selec-operation_deletion', OperationFormSelection),
- ('final-operation_deletion', OperationDeletionForm)],
+ ('final-operation_deletion', OperationDeletionForm)
+]
+
+operation_deletion_wizard = OperationDeletionWizard.as_view(
+ operation_deletion_steps,
label=_(u"Operation deletion"),
url_name='operation_deletion',)
diff --git a/ishtar_common/migrations/0058_generate_title.py b/ishtar_common/migrations/0058_generate_title.py
index 3fcb82ee5..d30850cab 100644
--- a/ishtar_common/migrations/0058_generate_title.py
+++ b/ishtar_common/migrations/0058_generate_title.py
@@ -15,6 +15,7 @@ TYPE = (
class Migration(SchemaMigration):
+ no_dry_run = True
def forwards(self, orm):
keys = {}
diff --git a/ishtar_common/migrations/0062_remove_ishtar_local_prefix.py b/ishtar_common/migrations/0062_remove_ishtar_local_prefix.py
index a4624081a..b1406a111 100644
--- a/ishtar_common/migrations/0062_remove_ishtar_local_prefix.py
+++ b/ishtar_common/migrations/0062_remove_ishtar_local_prefix.py
@@ -6,6 +6,7 @@ from django.db import models
class Migration(SchemaMigration):
+ no_dry_run = True
def forwards(self, orm):
for p in orm['ishtar_common.IshtarSiteProfile'].objects.all():