Пример #1
0
    def test_connect_existing_user_different_email(self):

        user = tt_make_user("Jonny")

        # his email is [email protected]
        velruse_user = VelruseModel.connect(user,
                                            "facebook",
                                            "328957239052",
                                            "[email protected]",
                                            True)

        meta.Session.commit()

        self.assertNotEqual(velruse_user, None)
        self.assertEqual(user.id, velruse_user.user_id)
        self.assertNotEqual(user.activation_code, None)
Пример #2
0
    def test_connect_existing_user_same_email(self):

        user = tt_make_user("Jonny")

        # his email is [email protected]
        velruse_user = VelruseModel.connect(user,
                                            "facebook",
                                            "239857329847",
                                            "[email protected]",
                                            True)

        meta.Session.commit()

        self.assertNotEqual(velruse_user, None)
        self.assertEqual(user.id, velruse_user.user_id)
        self.assertEqual(user.activation_code, None)