#NEWLINE# @ pytest . mark . parametrize ( ( 'args' , 'ekwargs' ) , [ ( [ ] , { #NEWLINE# #INDENT# 'message' : None , #NEWLINE# 'autogenerate' : False , #NEWLINE# 'head' : None , #NEWLINE# 'splice' : False , #NEWLINE# 'branch_label' : None , #NEWLINE# #UNINDENT# } ) , ( [ '-m' , 'the message' , '-a' , '--head' , 'foo' , '--splice' , '--branch-label' , 'wat' ] , { #NEWLINE# #INDENT# 'message' : 'the message' , #NEWLINE# 'autogenerate' : True , #NEWLINE# 'head' : 'foo' , #NEWLINE# 'splice' : True , #NEWLINE# 'branch_label' : 'wat' , #NEWLINE# #UNINDENT# } ) ] ) #NEWLINE# def test_revision_command( monkeypatch , cli , pyramid_config , args , ekwargs ) : #NEWLINE# #INDENT# alembic_revision = pretend . call_recorder ( ( lambda config , message , autogenerate , head , splice , branch_label : None ) ) #NEWLINE# monkeypatch . setattr ( alembic . command , 'revision' , alembic_revision ) #NEWLINE# alembic_config = pretend . stub ( ) #NEWLINE# pyramid_config . alembic_config = ( lambda : alembic_config ) #NEWLINE# result = cli . invoke ( revision , args , obj = cli ) #NEWLINE# assert ( result . exit_code == 0 ) #NEWLINE# assert ( alembic_revision . calls == [ pretend . call ( alembic_config , ** ekwargs ) ] )