aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest
diff options
context:
space:
mode:
Diffstat (limited to '_pytest')
-rw-r--r--_pytest/conftest.py3
-rw-r--r--_pytest/data/message-changed.json2
-rw-r--r--_pytest/data/message-deleted.json2
-rw-r--r--_pytest/data/message-normal.json2
-rw-r--r--_pytest/data/message-normal2.json2
-rw-r--r--_pytest/test_process_message.py2
-rw-r--r--_pytest/test_unfurl.py4
7 files changed, 10 insertions, 7 deletions
diff --git a/_pytest/conftest.py b/_pytest/conftest.py
index 2f90977..e9b7750 100644
--- a/_pytest/conftest.py
+++ b/_pytest/conftest.py
@@ -1,7 +1,8 @@
import pytest
import sys
-sys.path.append(str(pytest.config.rootdir))
+sys.path.append(".")
+#sys.path.append(str(pytest.config.rootdir))
from wee_slack import SlackServer
from wee_slack import Channel
diff --git a/_pytest/data/message-changed.json b/_pytest/data/message-changed.json
index 5a229dc..1f6f5a7 100644
--- a/_pytest/data/message-changed.json
+++ b/_pytest/data/message-changed.json
@@ -15,5 +15,5 @@
}
},
- "myserver": "test.slack.com"
+ "_server": "test.slack.com"
}
diff --git a/_pytest/data/message-deleted.json b/_pytest/data/message-deleted.json
index 91190b3..f162539 100644
--- a/_pytest/data/message-deleted.json
+++ b/_pytest/data/message-deleted.json
@@ -5,5 +5,5 @@
"channel": "C2147483705",
"ts": "1358878755.000001",
"deleted_ts": "1355517519.000005",
- "myserver": "test.slack.com"
+ "_server": "test.slack.com"
}
diff --git a/_pytest/data/message-normal.json b/_pytest/data/message-normal.json
index f3dc568..21610fd 100644
--- a/_pytest/data/message-normal.json
+++ b/_pytest/data/message-normal.json
@@ -4,5 +4,5 @@
"user": "U2147483697",
"text": "Hello world",
"ts": "1355517523.000005",
- "myserver": "test.slack.com"
+ "_server": "test.slack.com"
}
diff --git a/_pytest/data/message-normal2.json b/_pytest/data/message-normal2.json
index b67be66..d92a21f 100644
--- a/_pytest/data/message-normal2.json
+++ b/_pytest/data/message-normal2.json
@@ -4,5 +4,5 @@
"user": "U2147483697",
"text": "A Second message!",
"ts": "1355517524.000005",
- "myserver": "test.slack.com"
+ "_server": "test.slack.com"
}
diff --git a/_pytest/test_process_message.py b/_pytest/test_process_message.py
index a8cf9a2..1375d05 100644
--- a/_pytest/test_process_message.py
+++ b/_pytest/test_process_message.py
@@ -30,6 +30,8 @@ def test_process_message(slack_debug, monkeypatch, myservers, mychannels, myuser
messages.append( json.loads(open('_pytest/data/message-deleted.json', 'r').read()) )
for m in messages:
wee_slack.process_message(m)
+ print "---"
print called
+ print "---"
# assert called['buffer_prnt'] == 2
# assert called['buffer_prnt_changed'] == 1
diff --git a/_pytest/test_unfurl.py b/_pytest/test_unfurl.py
index 9af7cf2..c79c0f3 100644
--- a/_pytest/test_unfurl.py
+++ b/_pytest/test_unfurl.py
@@ -25,7 +25,7 @@ unfurl_map = [
"output": "url: https://example.com (example with spaces) suffix",
},
]
-
+
def test_unfurl_refs(myservers, mychannels, myusers):
slack.servers = myservers
@@ -34,7 +34,7 @@ def test_unfurl_refs(myservers, mychannels, myusers):
slack.message_cache = {}
slack.servers[0].users = myusers
print mychannels[0].identifier
-
+
for k in unfurl_map:
if "ignore_alt_text" in k:
assert slack.unfurl_refs(k["input"], ignore_alt_text=k["ignore_alt_text"]) == k["output"]