Add port option.
This commit is contained in:
parent
87c86bb902
commit
eb70174ed5
3 changed files with 23 additions and 5 deletions
|
|
@ -6,7 +6,7 @@ from moto.server import main
|
|||
|
||||
def test_wrong_arguments():
|
||||
try:
|
||||
main(["name", "test1", "test2"])
|
||||
main(["name", "test1", "test2", "test3"])
|
||||
assert False, ("main() when called with the incorrect number of args"
|
||||
" should raise a system exit")
|
||||
except SystemExit:
|
||||
|
|
@ -16,4 +16,10 @@ def test_wrong_arguments():
|
|||
@patch('moto.server.app.run')
|
||||
def test_right_arguments(app_run):
|
||||
main(["name", "s3"])
|
||||
app_run.assert_called_once_with()
|
||||
app_run.assert_called_once_with(port=None)
|
||||
|
||||
|
||||
@patch('moto.server.app.run')
|
||||
def test_port_argument(app_run):
|
||||
main(["name", "s3", 8080])
|
||||
app_run.assert_called_once_with(port=8080)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue