Skip to content

Commit

Permalink
v1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronny Vedrilla committed Oct 30, 2023
1 parent 828193d commit be0d5f1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/services/test_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from freezegun import freeze_time

from django_migration_zero.exceptions import InvalidMigrationTreeError
from django_migration_zero.managers import MigrationZeroConfigurationManager
from django_migration_zero.models import MigrationZeroConfiguration
from django_migration_zero.services.deployment import DatabasePreparationService

Expand Down Expand Up @@ -36,6 +37,15 @@ def test_process_regular(self):
self.config.refresh_from_db()
self.assertFalse(self.config.migration_imminent)

@mock.patch.object(MigrationZeroConfiguration, "is_migration_applicable", return_value=False)
@mock.patch.object(MigrationZeroConfigurationManager, "fetch_singleton", return_value=None)
def test_process_case_is_migration_applicable_false(self, *args):
# Setup
self.config.delete()

# Assertion
self.assertIsNone(self.service.process())

@mock.patch("django_migration_zero.services.deployment.call_command", return_value=1)
def test_process_case_migration_check_failed(self, *args):
# Setup
Expand Down

0 comments on commit be0d5f1

Please sign in to comment.