def test_overwrite(ex_db: GameDB): tok = ex_db.__players[0] ex_db.save_value(tok, "test_key", "str") assert ex_db.get_value(tok, "test_key") == "str" ex_db.save_value(tok, "test_key", 12) assert ex_db.get_value(tok, "test_key") == 12 ex_db.save_value(tok, "test_key", 3.14) assert ex_db.get_value(tok, "test_key") == 3.14
def test_simple_str(ex_db: GameDB): tok = ex_db.__players[0] ex_db.save_value(tok, "test_key", "test_value") assert ex_db.get_value(tok, "test_key") == "test_value"
def test_simple_float(ex_db: GameDB): tok = ex_db.__players[0] ex_db.save_value(tok, "test_key", 3.14) assert ex_db.get_value(tok, "test_key") == 3.14
def test_simple_int(ex_db: GameDB): tok = ex_db.__players[0] ex_db.save_value(tok, "test_key", 12) assert ex_db.get_value(tok, "test_key") == 12