Module ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If CompareEq NameLoad Str body Return Str If CompareEq NameLoad Str body Return Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str AttributeLoad NameLoad attr decorator_list decorator_list
N/A unittest TestCase mock MagicMock hipchat HipChat graphitepager.description Description graphitepager.notifiers.hipchat_notifier HipChatNotifier graphitepager.redis_storage RedisStorage graphitepager.alerts Alert graphitepager.config Config graphitepager.level Level TestHipChatNotifier N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self alert_key ALERT KEY N/A N/A self description N/A MagicMock Description N/A N/A self mock_config N/A MagicMock Config N/A N/A self mock_redis_storage N/A MagicMock RedisStorage N/A N/A self mock_hipchat_client N/A MagicMock HipChat N/A N/A self mock_alert N/A MagicMock Alert N/A N/A N/A self mock_config get N/A self mock_get N/A N/A self hcn N/A HipChatNotifier N/A self mock_redis_storage N/A self mock_config N/A N/A N/A self hcn _client N/A self mock_hipchat_client N/A mock_get N/A N/A self key default N/A None N/A N/A N/A key HIPCHAT_KEY N/A N/A HIPCHAT_KEY N/A N/A key HIPCHAT_ROOM N/A N/A ROOM NAME N/A default N/A test_should_not_notify_hipchat_if_no_rooms_have_been_added N/A N/A self N/A N/A N/A N/A N/A N/A self hcn notify N/A self mock_alert N/A self alert_key N/A Level WARNING N/A self description N/A N/A N/A self assertEqual N/A N/A N/A self mock_hipchat_client message_room mock_calls N/A N/A test_should_not_notify_hipchat_if_warning_and_already_notified N/A N/A self N/A N/A N/A N/A N/A N/A self mock_redis_storage is_locked_for_domain_and_key return_value True N/A N/A N/A N/A self hcn notify N/A self mock_alert N/A self alert_key N/A Level WARNING N/A self description N/A N/A N/A self assertEqual N/A N/A self mock_hipchat_client mock_calls N/A N/A test_should_notify_hipchat_resolved_if_nominal_and_had_notified N/A N/A self N/A N/A N/A room_name ROOM NAME N/A N/A N/A N/A self hcn add_room room_name N/A N/A N/A N/A self mock_redis_storage is_locked_for_domain_and_key return_value True N/A N/A N/A N/A self hcn notify N/A self mock_alert N/A self alert_key N/A Level NOMINAL N/A self description N/A N/A N/A N/A N/A self mock_redis_storage is_locked_for_domain_and_key assert_called_once_with HipChat N/A self alert_key N/A N/A N/A N/A N/A self mock_hipchat_client message_room assert_called_once_with room_name Graphite-Pager N/A N/A N/A self description html message_format html color green N/A N/A N/A N/A N/A self mock_redis_storage remove_lock_for_domain_and_key assert_called_once_with HipChat N/A self alert_key N/A test_should_notify_room_of_warning_if_had_not_notified_before N/A N/A self N/A N/A N/A room_name ROOM NAME N/A N/A N/A N/A self hcn add_room room_name N/A N/A N/A N/A self mock_redis_storage is_locked_for_domain_and_key return_value False N/A N/A N/A N/A self hcn notify N/A self mock_alert N/A self alert_key N/A Level WARNING N/A self description N/A N/A N/A N/A N/A self mock_hipchat_client message_room assert_called_once_with room_name Graphite-Pager N/A N/A N/A self description html message_format html color yellow N/A N/A N/A N/A N/A self mock_redis_storage set_lock_for_domain_and_key assert_called_once_with HipChat N/A self alert_key N/A test_should_notify_room_of_critical_if_had_not_notified_before N/A N/A self N/A N/A N/A room_name ROOM NAME N/A N/A N/A N/A self hcn add_room room_name N/A N/A N/A N/A self mock_redis_storage is_locked_for_domain_and_key return_value False N/A N/A N/A N/A self hcn notify N/A self mock_alert N/A self alert_key N/A Level CRITICAL N/A self description N/A N/A N/A N/A N/A self mock_hipchat_client message_room assert_called_once_with room_name Graphite-Pager N/A N/A N/A self description html message_format html color red N/A N/A N/A N/A N/A self mock_redis_storage set_lock_for_domain_and_key assert_called_once_with HipChat N/A self alert_key N/A test_should_notify_room_of_no_data_if_had_not_notified_before N/A N/A self N/A N/A N/A room_name ROOM NAME N/A N/A N/A N/A self hcn add_room room_name N/A N/A N/A N/A self mock_redis_storage is_locked_for_domain_and_key return_value False N/A N/A N/A N/A self hcn notify N/A self mock_alert N/A self alert_key N/A Level NO_DATA N/A self description N/A N/A N/A N/A N/A self mock_hipchat_client message_room assert_called_once_with room_name Graphite-Pager N/A N/A N/A self description html message_format html color red N/A N/A N/A N/A N/A self mock_redis_storage set_lock_for_domain_and_key assert_called_once_with HipChat N/A self alert_key N/A N/A