

def test_migration_multiple_users(self):
    user1 = UserFactory()
    user2 = UserFactory()
    oauth_settings = GoogleDriveOAuthSettingsFactory()
    user1.add_addon('googledrive')
    user1_addon = user1.get_addon('googledrive')
    user1_addon.oauth_settings = oauth_settings
    user1_addon.save()
    user2.add_addon('googledrive')
    user2_addon = user2.get_addon('googledrive')
    user2_addon.oauth_settings = oauth_settings
    user2_addon.save()
    do_migration([user1_addon, user2_addon])
    user1_addon.reload()
    user2_addon.reload()
    assert_equal(user1.external_accounts[0], user2.external_accounts[0])

dataset/ETHPy150Open CenterForOpenScience/osf.io/scripts/tests/test_googledrive_migrate_to_external_account.py TestGoogleDriveMigration.test_migration_multiple_users/original