@@ -29,7 +29,7 @@ def test_request(self, mock_request):
2929
3030 expected_calls = [call (
3131 'POST' , 'http://simple.com/api/admin/themes/5/templates/' ,
32- headers = {'Authorization' : 'Token apikey' },
32+ headers = {'Authorization' : 'Bearer apikey' },
3333 data = {'name' : 'assets/base.html' , 'content' : '{% load i18n %}\n \n <div class="mt-2">My home page</div>' },
3434 files = files )
3535 ]
@@ -57,7 +57,7 @@ def test_get_themes(self, mock_request):
5757 self .gateway .get_themes ()
5858
5959 expected_call = call ('GET' , 'http://simple.com/api/admin/themes/' ,
60- headers = {'Authorization' : 'Token apikey' }, data = {}, files = {})
60+ headers = {'Authorization' : 'Bearer apikey' }, data = {}, files = {})
6161 self .assertIn (expected_call , mock_request .mock_calls )
6262
6363 ####
@@ -84,7 +84,7 @@ def test_create_theme(self, mock_request):
8484 self .gateway .create_theme (name = "Test Init Theme" )
8585
8686 expected_call = call ('POST' , 'http://simple.com/api/admin/themes/' ,
87- headers = {'Authorization' : 'Token apikey' }, data = payload , files = {})
87+ headers = {'Authorization' : 'Bearer apikey' }, data = payload , files = {})
8888 self .assertIn (expected_call , mock_request .mock_calls )
8989
9090 #####
@@ -111,7 +111,7 @@ def test_get_templates(self, mock_request):
111111 self .gateway .get_templates (theme_id = 6 )
112112
113113 expected_call = call ('GET' , 'http://simple.com/api/admin/themes/6/templates/' ,
114- headers = {'Authorization' : 'Token apikey' }, data = {}, files = {})
114+ headers = {'Authorization' : 'Bearer apikey' }, data = {}, files = {})
115115 self .assertIn (expected_call , mock_request .mock_calls )
116116
117117 #####
@@ -137,7 +137,7 @@ def test_get_template(self, mock_request):
137137 self .gateway .get_template (theme_id = 6 , template_name = template_name )
138138
139139 expected_call = call ('GET' , f'http://simple.com/api/admin/themes/6/templates/?name={ template_name } ' ,
140- headers = {'Authorization' : 'Token apikey' }, data = {}, files = {})
140+ headers = {'Authorization' : 'Bearer apikey' }, data = {}, files = {})
141141 self .assertIn (expected_call , mock_request .mock_calls )
142142
143143 #####
@@ -168,7 +168,7 @@ def test_create_or_update_template(self, mock_request):
168168 theme_id = 6 , template_name = payload ['name' ], content = payload ['content' ], files = files )
169169
170170 expected_call = call ('POST' , 'http://simple.com/api/admin/themes/6/templates/' ,
171- headers = {'Authorization' : 'Token apikey' }, data = payload , files = files )
171+ headers = {'Authorization' : 'Bearer apikey' }, data = payload , files = files )
172172 self .assertIn (expected_call , mock_request .mock_calls )
173173
174174 #####
@@ -196,5 +196,5 @@ def test_delete_template(self, mock_request):
196196 self .gateway .delete_template (theme_id = 6 , template_name = 'asset/custom.css' )
197197
198198 expected_call = call ('DELETE' , 'http://simple.com/api/admin/themes/6/templates/?name=asset/custom.css' ,
199- headers = {'Authorization' : 'Token apikey' }, data = {}, files = {})
199+ headers = {'Authorization' : 'Bearer apikey' }, data = {}, files = {})
200200 self .assertIn (expected_call , mock_request .mock_calls )
0 commit comments