5
5
6
6
@pytest .fixture
7
7
def migration_instance ():
8
- return Migration (os . path . dirname ( __file__ ) )
8
+ return Migration ()
9
9
10
10
@pytest .fixture
11
11
def mock_get_previous_migration_id ():
@@ -26,8 +26,8 @@ def test_build_migration_sequence_empty(mock_get_previous_migration_id):
26
26
27
27
def test_build_migration_sequence_with_dependencies (mock_get_previous_migration_id ):
28
28
# Mock the output of get_migration_files
29
- fake_filenames = ['migration1.py' , 'migration2.py' , 'migration3.py' ]
30
- with patch .object (Migration , 'get_migration_files' , return_value = fake_filenames ):
29
+ mock_filenames = ['migration1.py' , 'migration2.py' , 'migration3.py' ]
30
+ with patch .object (Migration , 'get_migration_files' , return_value = mock_filenames ):
31
31
# Mock the output of get_previous_migration_id
32
32
mock_get_previous_migration_id .side_effect = {
33
33
'migration2.py' : 'migration1' ,
@@ -47,8 +47,8 @@ def test_build_migration_sequence_with_dependencies(mock_get_previous_migration_
47
47
48
48
def test_build_migration_sequence_with_circular_dependency (mock_get_previous_migration_id ):
49
49
# Mock the output of get_migration_files
50
- fake_filenames = ['migration1.py' , 'migration2.py' ]
51
- with patch .object (Migration , 'get_migration_files' , return_value = fake_filenames ):
50
+ mock_filenames = ['migration1.py' , 'migration2.py' ]
51
+ with patch .object (Migration , 'get_migration_files' , return_value = mock_filenames ):
52
52
# Mock the output of get_previous_migration_id to create circular dependency
53
53
mock_get_previous_migration_id .side_effect = {
54
54
'migration2.py' : 'migration1' ,
0 commit comments