Some more sendkeys messages

This commit is contained in:
2021-03-14 14:02:57 +01:00
parent d67b574969
commit 1c50451187
3 changed files with 55 additions and 16 deletions

View File

@@ -1,5 +1,6 @@
from src import sendkeys
from src import config
from src import data
def test_sendkeys():
@@ -7,12 +8,16 @@ def test_sendkeys():
def test_send_to():
sendkeys.send_to('Sinusal', 'Hi, how are you?')
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')
sendkeys.send_pickup('Sinusal', 'Watcher\'s Eye', 11, 'Exalts', conf)
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():
@@ -22,4 +27,13 @@ def test_wait():
def test_ty():
conf = config.read_config(r'config.yaml')
sendkeys.send_ty('Sinusal', conf)
sendkeys.send_ty('Sinusal', 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)