Exemplo n.º 1
0
    def test_create_getting_sender_key_from_data(self):
        """Test invite create method."""
        # test the case in which the data has the sender key and name
        invite = Invite()
        created_invite = Invite.create(self.data, invite)

        self.assertEquals(
            created_invite, self.expected_invite,
            "The created invite should be iqual to the expected one")
Exemplo n.º 2
0
    def test_create_getting_sender_key_from_invite(self):
        """Test the case in which the sender key is get from the invite."""
        self.data["sender_key"] = None
        self.data["sender_name"] = None
        invite = Invite()
        invite.admin_key = self.admin.key
        created_invite = Invite.create(self.data, invite)

        self.assertEquals(
            created_invite, self.expected_invite,
            "The created invite should be iqual to the expected one")