Module Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias alias alias alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Dict Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr For NameStore Call NameLoad Num Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad Str attr NameLoad keyword AttributeLoad NameLoad attr For NameStore Call NameLoad Num Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad Str attr NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad Num Num body Expr Call AttributeLoad AttributeLoad Call NameLoad attr attr keyword BinOpMod Str NameLoad keyword BinOpMod Str NameLoad keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad Call NameLoad attr attr keyword Num Assign NameStore Call AttributeLoad AttributeLoad Call NameLoad attr attr keyword Num For NameStore Call NameLoad Num Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad Str attr NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr Str keyword NameLoad body Expr Call NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Num Num Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num With Call AttributeLoad NameLoad attr Str keyword NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr Num Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad With Call AttributeLoad NameLoad attr Str keyword NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad With Call AttributeLoad NameLoad attr Str keyword NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr Num Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Num Dict Str Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad Num body Assign NameStore BinOpSub Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Num Assign NameStore NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list Call NameLoad keyword Call AttributeLoad NameLoad attr keyword Num FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad Num body Assign NameStore BinOpSub Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Num Assign NameStore NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr For NameStore Call NameLoad Num body Assign NameStore BinOpSub Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Num Assign NameStore NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list Call NameLoad keyword Call AttributeLoad NameLoad attr keyword Num decorator_list
N/A N/A datetime N/A mock django.contrib.auth get_user_model django.test TestCase django.test.utils override_settings django.utils timezone gcm.gcm GCMNotRegisteredException pushy.models PushNotification Device get_filtered_devices_queryset pushy.tasks check_pending_push_notifications send_push_notification_group send_single_push_notification create_push_notification_groups clean_sent_notifications TasksTestCase N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self payload N/A key1 key2 value1 value2 N/A test_get_filtered_devices_queryset_on_type N/A N/A self N/A N/A N/A notification N/A N/A N/A PushNotification objects create title test payload N/A self payload active N/A PushNotification PUSH_ACTIVE sent N/A PushNotification PUSH_NOT_SENT filter_type N/A Device DEVICE_TYPE_IOS N/A i N/A range 0 3 N/A N/A N/A N/A N/A Device objects create key N/A N/A TEST_DEVICE_KEY_{} format i type N/A Device DEVICE_TYPE_IOS N/A i N/A range 0 10 N/A N/A N/A N/A N/A Device objects create key N/A N/A TEST_DEVICE_KEY_{} format i type N/A Device DEVICE_TYPE_ANDROID N/A devices N/A get_filtered_devices_queryset notification N/A N/A N/A self assertEqual N/A N/A devices count 3 N/A test_get_filtered_devices_queryset_on_user N/A N/A self N/A N/A N/A i N/A range 0 3 N/A N/A N/A N/A N/A N/A get_user_model objects create_user username N/A test_user_%d i email N/A test_user_%d@django-pushy.com i password i N/A user1 N/A N/A N/A N/A get_user_model objects get pk 1 N/A user2 N/A N/A N/A N/A get_user_model objects get pk 2 N/A i N/A range 0 5 N/A N/A N/A N/A N/A Device objects create key N/A N/A TEST_DEVICE_KEY_{} format i type N/A Device DEVICE_TYPE_ANDROID user user2 N/A notification N/A N/A N/A PushNotification objects create title test payload N/A self payload active N/A PushNotification PUSH_ACTIVE sent N/A PushNotification PUSH_NOT_SENT filter_user N/A user2 id N/A devices N/A get_filtered_devices_queryset notification N/A N/A N/A self assertEqual N/A N/A devices count 5 N/A notification N/A N/A N/A PushNotification objects create title test payload N/A self payload active N/A PushNotification PUSH_ACTIVE sent N/A PushNotification PUSH_NOT_SENT filter_user N/A user1 id N/A devices N/A get_filtered_devices_queryset notification N/A N/A N/A self assertEqual N/A N/A devices count 0 N/A test_pending_notifications N/A N/A self N/A N/A N/A notification N/A N/A N/A PushNotification objects create title test payload N/A self payload active N/A PushNotification PUSH_ACTIVE sent N/A PushNotification PUSH_NOT_SENT N/A mocked_task N/A N/A mock Mock N/A N/A N/A mock patch pushy.tasks.create_push_notification_groups.apply_async new mocked_task N/A N/A N/A check_pending_push_notifications N/A notification N/A N/A N/A PushNotification objects get pk N/A notification id N/A N/A N/A self assertEqual N/A notification sent N/A PushNotification PUSH_IN_PROGRESS N/A N/A create_push_notification_groups N/A notification id N/A notification N/A N/A N/A PushNotification objects get pk N/A notification id N/A N/A N/A self assertEqual N/A notification sent N/A PushNotification PUSH_SENT N/A test_send_notification_groups N/A N/A self N/A N/A N/A notification N/A N/A N/A PushNotification objects create title test payload N/A self payload active N/A PushNotification PUSH_ACTIVE sent N/A PushNotification PUSH_NOT_SENT N/A N/A N/A self assertFalse N/A send_push_notification_group 13 0 1 N/A device N/A N/A N/A Device objects create key TEST_DEVICE_KEY_ANDROID type N/A Device DEVICE_TYPE_ANDROID N/A gcm N/A N/A mock Mock N/A N/A gcm return_value 123123 N/A N/A N/A mock patch gcm.GCM.plaintext_request new gcm N/A N/A N/A send_push_notification_group N/A notification id 0 1 N/A device N/A N/A N/A Device objects get pk N/A device id N/A N/A N/A self assertEqual N/A device key 123123 N/A gcm N/A N/A mock Mock N/A N/A gcm side_effect GCMNotRegisteredException N/A N/A N/A mock patch gcm.GCM.plaintext_request new gcm N/A N/A N/A send_push_notification_group N/A notification id 0 1 N/A N/A N/A self assertRaises N/A Device DoesNotExist N/A N/A Device objects get pk N/A device id N/A device N/A N/A N/A Device objects create key TEST_DEVICE_KEY_ANDROID2 type N/A Device DEVICE_TYPE_ANDROID N/A gcm N/A N/A mock Mock N/A N/A gcm return_value False N/A N/A N/A mock patch gcm.GCM.plaintext_request new gcm N/A N/A N/A send_push_notification_group N/A notification id 0 1 N/A device N/A N/A N/A Device objects get pk N/A device id N/A N/A N/A self assertEqual N/A device key TEST_DEVICE_KEY_ANDROID2 N/A test_create_push_notification_groups_non_existent_notification N/A N/A self N/A N/A N/A result N/A create_push_notification_groups 1000 N/A N/A N/A self assertFalse result N/A test_non_existent_device N/A N/A self N/A N/A N/A result N/A send_single_push_notification 1000 N/A payload test N/A N/A N/A self assertFalse result N/A test_delete_old_notifications_undefine_max_age N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError clean_sent_notifications N/A test_delete_old_notifications N/A N/A self N/A N/A N/A i N/A xrange 10 N/A N/A date_started N/A N/A N/A timezone now N/A N/A datetime timedelta days 91 N/A date_finished date_started N/A notification N/A PushNotification N/A N/A notification title N/A N/A title {} format i N/A N/A notification body {} N/A N/A notification sent N/A PushNotification PUSH_SENT N/A N/A notification date_started date_started N/A N/A notification date_finished date_finished N/A N/A N/A notification save N/A N/A clean_sent_notifications N/A N/A N/A self assertEquals N/A N/A N/A PushNotification objects count 0 N/A N/A override_settings PUSHY_NOTIFICATION_MAX_AGE N/A N/A datetime timedelta days 90 test_delete_old_notifications_with_remaining_onces N/A N/A self N/A N/A N/A i N/A xrange 10 N/A N/A date_started N/A N/A N/A timezone now N/A N/A datetime timedelta days 91 N/A date_finished date_started N/A notification N/A PushNotification N/A N/A notification title N/A N/A title {} format i N/A N/A notification body {} N/A N/A notification sent N/A PushNotification PUSH_SENT N/A N/A notification date_started date_started N/A N/A notification date_finished date_finished N/A N/A N/A notification save N/A i N/A xrange 10 N/A N/A date_started N/A N/A N/A timezone now N/A N/A datetime timedelta days 61 N/A date_finished date_started N/A notification N/A PushNotification N/A N/A notification title N/A N/A title {} format i N/A N/A notification body {} N/A N/A notification sent N/A PushNotification PUSH_SENT N/A N/A notification date_started date_started N/A N/A notification date_finished date_finished N/A N/A N/A notification save N/A N/A clean_sent_notifications N/A N/A N/A self assertEquals N/A N/A N/A PushNotification objects count 10 N/A N/A override_settings PUSHY_NOTIFICATION_MAX_AGE N/A N/A datetime timedelta days 90 N/A