tests: fix get_label mockup to return meaningful values
Reject invalid argument.
This commit is contained in:
parent
98115eb541
commit
bf0966bfcf
@ -46,7 +46,12 @@ class TestApp(qubes.tests.TestEmitter):
|
|||||||
|
|
||||||
def get_label(self, label):
|
def get_label(self, label):
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
return self.labels[1]
|
if label in self.labels:
|
||||||
|
return self.labels[label]
|
||||||
|
for l in self.labels.values():
|
||||||
|
if l.name == label:
|
||||||
|
return l
|
||||||
|
raise KeyError(label)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(TestApp, self).__init__()
|
super(TestApp, self).__init__()
|
||||||
|
Loading…
Reference in New Issue
Block a user