48 lines
1.9 KiB
Python
48 lines
1.9 KiB
Python
from src import sendkeys
|
|
from src import config
|
|
from src import data
|
|
|
|
|
|
def test_sendkeys():
|
|
sendkeys.send_text('Hello World')
|
|
|
|
|
|
def test_send_to():
|
|
sendkeys.send_to('Sinusal', 'Your item level 21 23% Vaal Impurity of Lightning for 18 chaos is ready to pickup.')
|
|
|
|
|
|
def test_pickup():
|
|
conf = config.read_config(r'config.yaml')
|
|
data.compile_regex(conf)
|
|
text = '2021/03/08 23:24:52 17931875 bb3 [INFO Client 1492] @From Sinusal: Hi, I would like to buy your level 21 23% Vaal Impurity of Lightning ' \
|
|
'listed for 18 chaos in Ritual (stash tab "$"; position: left 22, top 5)'
|
|
message = data.Message.from_text(text)
|
|
sendkeys.send_to_format('pickup', message, conf)
|
|
|
|
|
|
def test_wait():
|
|
conf = config.read_config(r'config.yaml')
|
|
data.compile_regex(conf)
|
|
text = '2021/03/08 23:24:52 17931875 bb3 [INFO Client 1492] @From Sinusal: Hi, I would like to buy your level 21 23% Vaal Impurity of Lightning ' \
|
|
'listed for 18 chaos in Ritual (stash tab "$"; position: left 22, top 5)'
|
|
message = data.Message.from_text(text)
|
|
sendkeys.send_to_format('wait', message, conf)
|
|
|
|
|
|
def test_ty():
|
|
conf = config.read_config(r'config.yaml')
|
|
data.compile_regex(conf)
|
|
text = '2021/03/08 23:24:52 17931875 bb3 [INFO Client 1492] @From Sinusal: Hi, I would like to buy your level 21 23% Vaal Impurity of Lightning ' \
|
|
'listed for 18 chaos in Ritual (stash tab "$"; position: left 22, top 5)'
|
|
message = data.Message.from_text(text)
|
|
sendkeys.send_to_format('ty', message, conf)
|
|
|
|
|
|
def test_sold():
|
|
conf = config.read_config(r'config.yaml')
|
|
data.compile_regex(conf)
|
|
text = '2021/03/08 23:24:52 17931875 bb3 [INFO Client 1492] @From Sinusal: Hi, I would like to buy your level 21 23% Vaal Impurity of Lightning ' \
|
|
'listed for 18 chaos in Ritual (stash tab "$"; position: left 22, top 5)'
|
|
message = data.Message.from_text(text)
|
|
sendkeys.send_to_format('sold', message, conf)
|