示例#1
0
    def test_push_manager_init_with_all_services(self):
        pm = PushManager(
            [GCMPushService(GCM_OPS),
             BBPushService(BLACKBERRY_OPS)])

        self.assertTrue(pm.get_service(GCMPushService.type))
        self.assertTrue(pm.get_service(BBPushService.type))

        self.assertTrue(pm.get_service('Must NOT exist') == None)
    def test_push_manager_add_all_push_services(self):
        pm = PushManager()

        pm.add_service(GCMPushService(GCM_OPS))
        pm.add_service(BBPushService(BLACKBERRY_OPS))

        self.assertTrue(pm.get_service(GCMPushService.type))
        self.assertTrue(pm.get_service(BBPushService.type))

        self.assertTrue(pm.get_service('Must NOT exist') == None)
    def test_push_manager_init_with_all_services(self):
        pm = PushManager([
            GCMPushService(GCM_OPS),
            BBPushService(BLACKBERRY_OPS)
        ])

        self.assertTrue(pm.get_service(GCMPushService.type))
        self.assertTrue(pm.get_service(BBPushService.type))

        self.assertTrue(pm.get_service('Must NOT exist') == None)
示例#4
0
    def test_push_manager_add_all_push_services(self):
        pm = PushManager()

        pm.add_service(GCMPushService(GCM_OPS))
        pm.add_service(BBPushService(BLACKBERRY_OPS))

        self.assertTrue(pm.get_service(GCMPushService.type))
        self.assertTrue(pm.get_service(BBPushService.type))

        self.assertTrue(pm.get_service('Must NOT exist') == None)