Refactored Command to add owner
This commit is contained in:
@@ -34,13 +34,13 @@ def rt(user):
|
||||
|
||||
class TestingCommand:
|
||||
def test_i_can_trigger_a_command(self, user):
|
||||
command = Command('test', 'TestingCommand', new_value, "this is my new value")
|
||||
command = Command('test', 'TestingCommand', None, new_value, "this is my new value")
|
||||
testable = TestableElement(user, mk.button('button', command))
|
||||
testable.click()
|
||||
assert user.get_content() == "this is my new value"
|
||||
|
||||
def test_error_is_raised_when_command_is_not_found(self, user):
|
||||
command = Command('test', 'TestingCommand', new_value, "this is my new value")
|
||||
command = Command('test', 'TestingCommand', None, new_value, "this is my new value")
|
||||
CommandsManager.reset()
|
||||
testable = TestableElement(user, mk.button('button', command))
|
||||
|
||||
@@ -50,7 +50,7 @@ class TestingCommand:
|
||||
assert "not found." in str(exc_info.value)
|
||||
|
||||
def test_i_can_play_a_complex_scenario(self, user, rt):
|
||||
command = Command('test', 'TestingCommand', new_value, "this is my new value")
|
||||
command = Command('test', 'TestingCommand', None, new_value, "this is my new value")
|
||||
|
||||
@rt('/')
|
||||
def get(): return mk.button('button', command)
|
||||
|
||||
Reference in New Issue
Block a user