#1 s/last_script/last_command/, s/last_fixed_script/last_fixed_command/
This commit is contained in:
@@ -27,16 +27,16 @@ class TestHistory(object):
|
||||
|
||||
def test_set(self, db):
|
||||
history = History()
|
||||
history.update(last_script='ls',
|
||||
last_fixed_script=None)
|
||||
assert db == {'1-last_script': 'ls',
|
||||
'1-last_fixed_script': None}
|
||||
history.update(last_command='ls',
|
||||
last_fixed_command=None)
|
||||
assert db == {'1-last_command': 'ls',
|
||||
'1-last_fixed_command': None}
|
||||
|
||||
def test_get(self, db):
|
||||
history = History()
|
||||
db['1-last_script'] = 'cd ..'
|
||||
assert history.last_script == 'cd ..'
|
||||
db['1-last_command'] = 'cd ..'
|
||||
assert history.last_command == 'cd ..'
|
||||
|
||||
def test_get_without_value(self):
|
||||
history = History()
|
||||
assert history.last_script is None
|
||||
assert history.last_command is None
|
||||
|
||||
Reference in New Issue
Block a user