Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
fix ci failed
Browse files Browse the repository at this point in the history
  • Loading branch information
luoxiaohei committed Nov 19, 2019
1 parent da0ee60 commit aa71b65
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/commands/migrations/test_make_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_basic_create_gives_creator_proper_arguments_when_table_is_set(self):
self.run_command(command, [("name", "create_foo"), ("--table", "users")])

def test_basic_create_gives_creator_proper_arguments_when_table_is_set_with_create(
self
self,
):
creator_mock = flexmock(MigrationCreator)
creator_mock.should_receive("create").once().with_args(
Expand Down
13 changes: 7 additions & 6 deletions tests/commands/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,23 @@ class FooCommand(Command):
"""
Test Command
"""
name = 'foo'

name = "foo"

def handle(self):
pass


class CommandTestCase(OratorCommandTestCase):
def test_get_py_config_and_require___file__(self):
filename = tempfile.mktemp('.py')
with open(filename, 'w') as f:
f.write('foo = __file__')
filename = tempfile.mktemp(".py")
with open(filename, "w") as f:
f.write("foo = __file__")

command = flexmock(FooCommand())
command.should_call('_get_config').and_return({'foo': filename})
command.should_call("_get_config").and_return({"foo": filename})

self.run_command(command, [('-c', filename)])
self.run_command(command, [("-c", filename)])

if os.path.exists(filename):
os.remove(filename)
2 changes: 1 addition & 1 deletion tests/migrations/test_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def test_last_batch_of_migrations_can_be_rolled_back(self):
migrator.rollback(os.getcwd())

def test_last_batch_of_migrations_can_be_rolled_back_directly_if_transactional_is_false(
self
self,
):
resolver_mock = flexmock(DatabaseManager)
resolver_mock.should_receive("connection").and_return({})
Expand Down

0 comments on commit aa71b65

Please sign in to comment.