8
8
9
9
from book_tester import (
10
10
ChapterTest ,
11
- PHANTOMJS_RUNNER ,
11
+ JASMINE_RUNNER ,
12
12
contains ,
13
13
wrap_long_lines ,
14
14
split_blocks ,
@@ -1025,7 +1025,7 @@ def test_fails_if_lists_fail_and_no_accounts(self):
1025
1025
with self .assertRaises (AssertionError ):
1026
1026
self .check_qunit_output (Output ("arg" ))
1027
1027
1028
- def test_runs_phantomjs_runner_against_lists_tests (self ):
1028
+ def TODOtest_runs_phantomjs_runner_against_lists_tests (self ):
1029
1029
self .chapter_name = "chapter_16_javascript"
1030
1030
self .sourcetree .start_with_checkout (
1031
1031
"chapter_deploying_validation" , "chapter_16_javascript"
@@ -1036,39 +1036,10 @@ def test_runs_phantomjs_runner_against_lists_tests(self):
1036
1036
)
1037
1037
1038
1038
manual_run = subprocess .check_output (
1039
- ["phantomjs" , PHANTOMJS_RUNNER , lists_tests ],
1040
- env = {** os .environ , "OPENSSL_CONF" : "/dev/null" },
1039
+ ["python" , JASMINE_RUNNER , lists_tests ],
1041
1040
)
1042
1041
expected = Output (manual_run .strip ().decode ())
1043
- self .check_qunit_output (expected ) # should pass
1044
-
1045
- def DONTtest_runs_against_accounts_if_lists_pass (self ):
1046
- self .chapter_name = "chapter_deploying_validation"
1047
- self .sourcetree .start_with_checkout (
1048
- "chapter_deploying_validation" , "chapter_16_javascript"
1049
- )
1050
- lists_tests = os .path .abspath (
1051
- os .path .join (
1052
- os .path .dirname (__file__ ),
1053
- "../source/chapter_15_advanced_forms/superlists/lists/static/tests/tests.html" ,
1054
- )
1055
- )
1056
- accounts_tests = lists_tests .replace ("/lists/" , "/accounts/" )
1057
-
1058
- def test_results (path ):
1059
- if path == lists_tests :
1060
- return "0 failed"
1061
- if path == accounts_tests :
1062
- return "2 failed"
1063
-
1064
- self .run_js_tests = test_results
1065
- self .assert_console_output_correct = Mock ()
1066
-
1067
- self .check_qunit_output ("expected" )
1068
- assert self .assert_console_output_correct .call_args_list == [
1069
- call ("0 failed" , "expected" ),
1070
- call ("2 failed" , "expected" ),
1071
- ]
1042
+ self .check_jasmine_output (expected ) # should pass
1072
1043
1073
1044
1074
1045
class CheckFinalDiffTest (ChapterTest ):
0 commit comments