Exemple #1
0
def test_try_premium_at_start_old_account_can_pull_data(
        rotkehlchen_instance,
        username,
        db_password,
        rotki_premium_credentials,
):
    setup_starting_environment(
        rotkehlchen_instance=rotkehlchen_instance,
        username=username,
        db_password=db_password,
        premium_credentials=rotki_premium_credentials,
        first_time=False,
        same_hash_with_remote=False,
        newer_remote_db=True,
        db_can_sync_setting=True,
    )
    assert_db_got_replaced(rotkehlchen_instance=rotkehlchen_instance, username=username)
Exemple #2
0
def test_try_premium_at_start_new_account_can_pull_data(
        rotkehlchen_instance,
        username,
        db_password,
        rotki_premium_credentials,
):
    # Test that even with can_sync False, at start of new account we attempt data pull
    setup_starting_environment(
        rotkehlchen_instance=rotkehlchen_instance,
        username=username,
        db_password=db_password,
        premium_credentials=rotki_premium_credentials,
        first_time=True,
        same_hash_with_remote=False,
        newer_remote_db=True,
        db_can_sync_setting=False,
    )
    assert_db_got_replaced(rotkehlchen_instance=rotkehlchen_instance, username=username)
Exemple #3
0
def test_try_premium_at_start_old_account_can_pull_old_data(
        rotkehlchen_instance,
        username,
        db_password,
        rotki_premium_credentials,
):
    """
    Test that if the remote DB is of an old version its upgraded before replacing our current

    For an old account
    """
    setup_starting_environment(
        rotkehlchen_instance=rotkehlchen_instance,
        username=username,
        db_password=db_password,
        premium_credentials=rotki_premium_credentials,
        first_time=False,
        same_hash_with_remote=False,
        newer_remote_db=True,
        db_can_sync_setting=True,
        remote_data=REMOTE_DATA_OLDER_DB,
    )
    assert_db_got_replaced(rotkehlchen_instance=rotkehlchen_instance, username=username)