-
Notifications
You must be signed in to change notification settings - Fork 20
Implement a metrics resource using Vumi blinkenlights metrics publishers. #134
Implement a metrics resource using Vumi blinkenlights metrics publishers. #134
Conversation
if isinstance(user_account, basestring): | ||
user_account_key = user_account | ||
else: | ||
user_account_key = user_account.key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to accept both of these here? I'd prefer to have the caller extract the key if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really mind -- I was just trying to fit in with publish_conversation_metric
which takes a conversation
but not require people to look up the account if they only have the key.
…ric (first argument is now the user account key).
👍 |
This replaced #121. |
def _test_error(self, cmd, expected_error): | ||
with LogCatcher() as lc: | ||
reply = self.resource.handle_fire(self.dummy_api, cmd) | ||
self.assertEqual(lc.messages(), [expected_error]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't this in lc.errors
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we use log.warning
to log the error. :)
No description provided.