99from smart_tests .utils .http_client import get_base_url
1010from tests .cli_test_case import CliTestCase
1111
12+ _TOKEN = {"SMART_TESTS_TOKEN" : CliTestCase .smart_tests_token }
13+
1214
1315class CodeceptjsTest (CliTestCase ):
1416 @responses .activate
15- @mock .patch .dict (os .environ , { "LAUNCHABLE_TOKEN" : CliTestCase . smart_tests_token } )
17+ @mock .patch .dict (os .environ , _TOKEN )
1618 def test_record_test_codeceptjs (self ):
1719 result = self .cli (
1820 "record" ,
@@ -27,7 +29,7 @@ def test_record_test_codeceptjs(self):
2729 self .assert_record_tests_payload ("record_test_result.json" )
2830
2931 @responses .activate
30- @mock .patch .dict (os .environ , { "LAUNCHABLE_TOKEN" : CliTestCase . smart_tests_token } )
32+ @mock .patch .dict (os .environ , _TOKEN )
3133 def test_subset (self ):
3234 """Test basic subset functionality with multiple test files"""
3335 pipe = "test/example_test.js\n test/login_test.js\n "
@@ -70,7 +72,7 @@ def test_subset(self):
7072 )
7173
7274 @responses .activate
73- @mock .patch .dict (os .environ , { "LAUNCHABLE_TOKEN" : CliTestCase . smart_tests_token } )
75+ @mock .patch .dict (os .environ , _TOKEN )
7476 def test_subset_with_rest (self ):
7577 """Test subset functionality with --rest option to save remaining tests"""
7678 pipe = "test/example_test.js\n test/other_test.js\n "
@@ -132,7 +134,7 @@ def test_subset_with_rest(self):
132134 Path (rest_file_path ).unlink ()
133135
134136 @responses .activate
135- @mock .patch .dict (os .environ , { "LAUNCHABLE_TOKEN" : CliTestCase . smart_tests_token } )
137+ @mock .patch .dict (os .environ , _TOKEN )
136138 def test_subset_with_single_test (self ):
137139 """Test subset functionality with a single test file"""
138140 pipe = "test/single_test.js\n "
@@ -172,7 +174,7 @@ def test_subset_with_single_test(self):
172174 self .assertEqual (output_json ["tests" ], ["test/single_test.js" ])
173175
174176 @responses .activate
175- @mock .patch .dict (os .environ , { "LAUNCHABLE_TOKEN" : CliTestCase . smart_tests_token } )
177+ @mock .patch .dict (os .environ , _TOKEN )
176178 def test_subset_strips_newlines (self ):
177179 """Test that subset properly strips newlines from test paths"""
178180 # Test with various newline formats
0 commit comments