Exemplo n.º 1
0
    def test_send_notifying_message_phone(self):
        elsigh_user = models.FMBUser(
            name='elsigh'
        )
        elsigh_user.put()

        api.send_notifying_message(
            elsigh_user.key.id(),
            'phone', 'Angela Pater', '512-736-6633', send=False)

        q = models.NotificationSent.query(ancestor=elsigh_user.key)
        q = q.filter(models.NotificationSent.means == '512-736-6633')
        self.assertEquals(1, q.count())
Exemplo n.º 2
0
    def test_send_notifying_message_email(self):
        elsigh_user = models.FMBUser(
            name='elsigh'
        )
        elsigh_user.put()

        api.send_notifying_message(
            elsigh_user.key.id(),
            'email', 'Angela Pater', '*****@*****.**', send=False)

        q = models.NotificationSent.query(ancestor=elsigh_user.key)
        q = q.filter(models.NotificationSent.means == '*****@*****.**')
        self.assertEquals(1, q.count())