def test_insert_user_with_character(self): u = User() u.email = EMAIL2 u.password = PASSWORD2 u.level = 321 u.activation_token = 'a-token for user 2' c1 = Character() c1.eve_id = 1 c1.token = 'token #1' c2 = Character() c2.eve_id = 2 c2.token = 'token #2' u.characters = [c1, c2] self.assertIsNotNone(u.insert()) u2 = user_loader(EMAIL2) self.assertTrue(isinstance(u2, User))