def METHOD_NAME(self):
    token = InviteUrlMock(
        request=mock.MagicMock(),
        private=True,
        content_object=self.invite_target
    ).generate_generictoken(email='test@example.com')
    self.assertEqual(token.metadata['email'], 'test@example.com')