@@ -15,27 +15,27 @@ def get_login_credentials(self, user_type):
15
15
# Example of parsing data from a file
16
16
with open ('qa_login_example.txt' ) as f :
17
17
file_lines = [line .rstrip () for line in f ]
18
- for line in file_lines :
19
- line_items = line .split (',' )
20
- if line_items [0 ] == user_type :
21
- return line_items [1 ], line_items [2 ]
18
+ for line in file_lines :
19
+ line_items = line .split (',' )
20
+ if line_items [0 ] == user_type :
21
+ return line_items [1 ], line_items [2 ]
22
22
23
23
def get_all_login_credentials (self ):
24
24
# Example of parsing data from a file (Method 2)
25
25
keys = {}
26
26
with open ('staging_login_example.txt' ) as f :
27
27
file_lines = [line .rstrip () for line in f ]
28
- for line in file_lines :
29
- line_items = line .split (',' )
30
- if line_items [0 ] == 'admin' :
31
- keys ['admin' ] = (
32
- {'username' : line_items [1 ], 'password' : line_items [2 ]})
33
- if line_items [0 ] == 'employee' :
34
- keys ['employee' ] = (
35
- {'username' : line_items [1 ], 'password' : line_items [2 ]})
36
- if line_items [0 ] == 'customer' :
37
- keys ['customer' ] = (
38
- {'username' : line_items [1 ], 'password' : line_items [2 ]})
28
+ for line in file_lines :
29
+ line_items = line .split (',' )
30
+ if line_items [0 ] == 'admin' :
31
+ keys ['admin' ] = (
32
+ {'username' : line_items [1 ], 'password' : line_items [2 ]})
33
+ if line_items [0 ] == 'employee' :
34
+ keys ['employee' ] = (
35
+ {'username' : line_items [1 ], 'password' : line_items [2 ]})
36
+ if line_items [0 ] == 'customer' :
37
+ keys ['customer' ] = (
38
+ {'username' : line_items [1 ], 'password' : line_items [2 ]})
39
39
return keys
40
40
41
41
0 commit comments