-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test_play, rename fa.play to fa.run
- Loading branch information
Showing
5 changed files
with
28 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
__author__ = 'Sheeo' | ||
|
||
from flexmock import flexmock | ||
|
||
process_mock = flexmock() | ||
|
||
import fa | ||
import fa.play | ||
|
||
fa.play.instance = process_mock | ||
|
||
|
||
def test_launches_process_with_given_arguments(): | ||
game_info = { | ||
'uid': 0, | ||
'recorder': 'Sheeo' | ||
} | ||
args = ['/some-arg', 'test'] | ||
process_mock.should_receive('run').with_args(game_info, args).and_return(True).once() | ||
assert fa.run(game_info, 0, args) | ||
|