Skip to content

Commit a9ab1ee

Browse files
committed
test: Pytest does not require test classes unless you need grouping or fixtures with class scope.
1 parent 82c40b5 commit a9ab1ee

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

test/unit/webdriver/log_test.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22

33
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
4+
# You may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
66
#
77
# http://www.apache.org/licenses/LICENSE-2.0
@@ -19,28 +19,28 @@
1919
from test.unit.helper.test_helper import appium_command, get_httpretty_request_body, ios_w3c_driver
2020

2121

22-
class TestWebDriverLog(object):
23-
@httpretty.activate
24-
def test_get_log_types(self):
25-
driver = ios_w3c_driver()
26-
httpretty.register_uri(
27-
httpretty.GET,
28-
appium_command('/session/1234567890/log/types'),
29-
body=json.dumps({'value': ['syslog']}),
30-
)
31-
log_types = driver.log_types
32-
assert log_types == ['syslog']
33-
34-
@httpretty.activate
35-
def test_get_log(self):
36-
driver = ios_w3c_driver()
37-
httpretty.register_uri(
38-
httpretty.POST,
39-
appium_command('/session/1234567890/log'),
40-
body=json.dumps({'value': ['logs as array']}),
41-
)
42-
log_types = driver.get_log('syslog')
43-
assert log_types == ['logs as array']
44-
45-
d = get_httpretty_request_body(httpretty.last_request())
46-
assert {'type': 'syslog'} == d
22+
@httpretty.activate
23+
def test_get_log_types():
24+
driver = ios_w3c_driver()
25+
httpretty.register_uri(
26+
httpretty.GET,
27+
appium_command('/session/1234567890/log/types'),
28+
body=json.dumps({'value': ['syslog']}),
29+
)
30+
log_types = driver.log_types
31+
assert log_types == ['syslog']
32+
33+
34+
@httpretty.activate
35+
def test_get_log():
36+
driver = ios_w3c_driver()
37+
httpretty.register_uri(
38+
httpretty.POST,
39+
appium_command('/session/1234567890/log'),
40+
body=json.dumps({'value': ['logs as array']}),
41+
)
42+
log_types = driver.get_log('syslog')
43+
assert log_types == ['logs as array']
44+
45+
d = get_httpretty_request_body(httpretty.last_request())
46+
assert {'type': 'syslog'} == d

0 commit comments

Comments
 (0)