Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
Fix accessing of conversation config in subscription metrics generati…
Browse files Browse the repository at this point in the history
…on (@jerith).
  • Loading branch information
hodgestar committed Nov 21, 2013
1 parent 6f2dda5 commit eb54651
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go/apps/subscription/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def get_metrics(self):

campaign_names = sorted(set([
h['campaign_name']
for h in self.conv.get_config().get('handlers', [])]))
for h in self.conv.config.get('handlers', [])]))

metrics.extend([
SubscribedMetric(self.conv, campaign_name)
Expand Down
3 changes: 2 additions & 1 deletion go/apps/subscription/tests/test_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ def setUp(self):
super(TestSubscriptionConversationDefinition, self).setUp()

self.setup_user_api()
self.conv = self.create_conversation(
wrapped_conv = self.create_conversation(
conversation_type=u'subscription',
config={
'handlers': [
{'campaign_name': 'campaign-1'},
{'campaign_name': 'campaign-2'}]
})
self.conv = wrapped_conv.c
self.conv_def = ConversationDefinition(self.conv)

def test_metrics_retrieval(self):
Expand Down

0 comments on commit eb54651

Please sign in to comment.