|
3 | 3 | """
|
4 | 4 | import pytest
|
5 | 5 | from unittest.mock import Mock
|
6 |
| -from collections import OrderedDict |
7 | 6 |
|
8 | 7 |
|
9 | 8 | CONFIGS = {
|
|
12 | 11 | },
|
13 | 12 | "status": "live",
|
14 | 13 | "configuration": {
|
15 |
| - "css": OrderedDict( |
16 |
| - # Just like a normal dict, but makes tests less flaky |
17 |
| - ( |
18 |
| - ("selected_font", ["lato", "lato"]), |
19 |
| - ("text_color", ["#0a0a0a", "#0a0a0a"]), |
20 |
| - ("header_logo_height", ["110", "110"]), |
21 |
| - ("header_buttons_color", ["#164be0", "#164be0"]), |
22 |
| - ("header_font_size", ["17", "17"]), |
23 |
| - ) |
24 |
| - ), |
| 14 | + "css": { |
| 15 | + "selected_font": "lato", |
| 16 | + "text_color": "#0a0a0a", |
| 17 | + "header_logo_height": "110", |
| 18 | + }, |
25 | 19 | "page": {
|
26 | 20 | "course-card": "course-tile-01",
|
27 | 21 | "privacy": {
|
@@ -70,15 +64,12 @@ def test_adapater(settings):
|
70 | 64 | assert setting_platform_name == CONFIGS['configuration']['setting']['PLATFORM_NAME']
|
71 | 65 | assert adapter.get_value_of_type('secret', 'SEGMENT_KEY', None) == 'so secret'
|
72 | 66 |
|
73 |
| - css_vars = adapter.get_amc_v1_theme_css_variables() |
74 |
| - # This change is temporary til we migrate off AMC and its edx-customers-theme |
75 |
| - assert css_vars == [ |
76 |
| - ["selected_font", ["lato", "lato"]], |
77 |
| - ["text_color", ["#0a0a0a", "#0a0a0a"]], |
78 |
| - ["header_logo_height", ["110", "110"]], |
79 |
| - ["header_buttons_color", ["#164be0", "#164be0"]], |
80 |
| - ["header_font_size", ["17", "17"]], |
81 |
| - ], 'get_amc_v1_theme_css_variables should return AMC-like variables' |
| 67 | + css_vars = adapter.get_css_variables_dict() |
| 68 | + assert css_vars == { |
| 69 | + "selected_font": "lato", |
| 70 | + "text_color": "#0a0a0a", |
| 71 | + "header_logo_height": "110", |
| 72 | + }, 'get_css_variables_dict returns a dictionary of all variables' |
82 | 73 |
|
83 | 74 | privacy_page_vars = adapter.get_value_of_type('page', 'privacy', None)
|
84 | 75 | assert privacy_page_vars == CONFIGS['configuration']['page']['privacy']
|
|
0 commit comments