import pytest
from unittest.mock import patch
from src import theme

def test_shader_config_parsing():
 config = {
  "theme": {
   "shader_crt": True,
   "shader_bloom": False,
   "shader_bg": "noise",
   "custom_window_frame": True
  }
 }
 
 with patch("src.theme.apply"), \
      patch("src.theme.apply_font"), \
      patch("src.theme.set_scale"):
  theme.load_from_config(config)
 
 assert theme.get_shader_config("crt") is True
 assert theme.get_shader_config("bloom") is False
 assert theme.get_shader_config("bg") == "noise"
 assert theme.get_window_frame_config() is True
