File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ pytest == 6.2.1
2+ allure-pytest == 2.8.29
Original file line number Diff line number Diff line change 1+ from dku_utils import template_dict
2+ import pytest
3+
4+
5+ class TestCommonMethods :
6+ def setup_class (self ):
7+ self .template = {
8+ 'url' : 'https://api.spotify.com/v1/users/{{user_id}}/playlists' ,
9+ 'headers' : {
10+ 'Content-Type' : 'application/json' ,
11+ 'Authorization' : 'Bearer {{access_token}}'
12+ },
13+ 'recipe_columns_parameter_names' : ['user_id' ],
14+ 'key_to_next_page_url' : 'next' , 'items_key' : 'items'
15+ }
16+ self .kwargs = {
17+ u'column' : u'profiles id' ,
18+ 'access_token' : u'12341234secretcode-4321shhhhhh' ,
19+ 'user_id' : '1234abcde'
20+ }
21+ self .endpoint_ok = {
22+ 'url' : 'https://api.spotify.com/v1/users/1234abcde/playlists' ,
23+ 'headers' : {
24+ 'Content-Type' : 'application/json' ,
25+ 'Authorization' : 'Bearer 12341234secretcode-4321shhhhhh'
26+ },
27+ 'key_to_next_page_url' : 'next' ,
28+ 'items_key' : 'items' ,
29+ 'recipe_columns_parameter_names' : ['user_id' ]
30+ }
31+
32+ def test_template_dict (self ):
33+ endpoint = template_dict (self .template , ** self .kwargs )
34+ assert endpoint == self .endpoint_ok
You can’t perform that action at this time.
0 commit comments