Ejemplo n.º 1
0
    def test_create_new_message_and_add_a_recipients(self, recipients):
        message = Message(connection=self.connection,
                          collector_id=self.collector_id,
                          config=self.config)

        with HTTMock(MessagesMock(self.config).create):
            message.create()

        with HTTMock(self.mock.recipient_add):
            response = message.recipients(recipients)

        expect(response["succeeded"]).to(have_length(be_above_or_equal(1)))
Ejemplo n.º 2
0
    def test_reminder_created(self):
        config = ReminderConfig()
        message = Message(connection=self.connection,
                          collector_id=self.collector_id,
                          config=config)

        with HTTMock(MessagesMock(config).create):
            reminder = message.create()

        expect(reminder).to(be_reminder)
Ejemplo n.º 3
0
    def test_invite_created(self):
        config = InviteConfig()
        message = Message(connection=self.connection,
                          collector_id=self.collector_id,
                          config=config)

        with HTTMock(MessagesMock(config).create):
            invite = message.create()

        expect(invite).to_not(be_sent)
        expect(invite).to(be_invite)
        expect(invite).to(have_key("id"))