Clone of official tools
notifier/mock.py@43:2a7da56ebd24, 2018-09-25 (annotated)
- Committer:
- theotherjimmy
- Date:
- Tue Sep 25 13:43:09 2018 -0500
- Revision:
- 43:2a7da56ebd24
Release 5.10.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
theotherjimmy |
43:2a7da56ebd24 | 1 | # mbed SDK |
theotherjimmy |
43:2a7da56ebd24 | 2 | # Copyright (c) 2011-2013 ARM Limited |
theotherjimmy |
43:2a7da56ebd24 | 3 | # |
theotherjimmy |
43:2a7da56ebd24 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
theotherjimmy |
43:2a7da56ebd24 | 5 | # you may not use this file except in compliance with the License. |
theotherjimmy |
43:2a7da56ebd24 | 6 | # You may obtain a copy of the License at |
theotherjimmy |
43:2a7da56ebd24 | 7 | # |
theotherjimmy |
43:2a7da56ebd24 | 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
theotherjimmy |
43:2a7da56ebd24 | 9 | # |
theotherjimmy |
43:2a7da56ebd24 | 10 | # Unless required by applicable law or agreed to in writing, software |
theotherjimmy |
43:2a7da56ebd24 | 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
theotherjimmy |
43:2a7da56ebd24 | 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
theotherjimmy |
43:2a7da56ebd24 | 13 | # See the License for the specific language governing permissions and |
theotherjimmy |
43:2a7da56ebd24 | 14 | # limitations under the License. |
theotherjimmy |
43:2a7da56ebd24 | 15 | |
theotherjimmy |
43:2a7da56ebd24 | 16 | from __future__ import print_function, division, absolute_import |
theotherjimmy |
43:2a7da56ebd24 | 17 | |
theotherjimmy |
43:2a7da56ebd24 | 18 | from . import Notifier |
theotherjimmy |
43:2a7da56ebd24 | 19 | |
theotherjimmy |
43:2a7da56ebd24 | 20 | class MockNotifier(Notifier): |
theotherjimmy |
43:2a7da56ebd24 | 21 | """Collect notifications |
theotherjimmy |
43:2a7da56ebd24 | 22 | """ |
theotherjimmy |
43:2a7da56ebd24 | 23 | def __init__(self): |
theotherjimmy |
43:2a7da56ebd24 | 24 | self.messages = [] |
theotherjimmy |
43:2a7da56ebd24 | 25 | |
theotherjimmy |
43:2a7da56ebd24 | 26 | def notify(self, message): |
theotherjimmy |
43:2a7da56ebd24 | 27 | self.messages.append(message) |