repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_hipchat.py
test_metadata
assert
collection
13
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError from notifiers.exceptions import ResourceError provider = "hipchat" class TestHipchat: def test_metadata(self, provider): assert provider.metadata ==
{ "base_url": "https://{group}.hipchat.com", "name": "hipchat", "site_url": "https://www.hipchat.com/docs/apiv2", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_hipchat.py
test_hipchat_rooms_attribs
assert
collection
35
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError from notifiers.exceptions import ResourceError provider = "hipchat" class TestHipChatRooms: resource = "rooms" def test_hipchat_rooms_attribs(self, resource): assert resource.schema == { ...
{ "allOf": [ {"required": ["token"]}, { "oneOf": [{"required": ["group"]}, {"required": ["team_server"]}], "error_oneOf": "Only one 'group' or 'team_server' is allowed", }, ] }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_join.py
test_join_devices_negative_online
assert
numeric_literal
17
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError from notifiers.exceptions import ResourceError provider = "join" class TestJoinDevices: resource = "devices" def test_join_devices_negative_online(self, resource): with pytest.raises(Resour...
404
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_join.py
test_missing_required
pytest.raises
variable
17
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError from notifiers.exceptions import ResourceError provider = "join" class TestJoin: @pytest.mark.parametrize( "data, message", [({}, "apikey"), ({"apikey": "foo"}, "message")] ) def test_m...
BadArguments)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_join.py
test_join_devices_negative_online
assert
collection
16
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError from notifiers.exceptions import ResourceError provider = "join" class TestJoinDevices: resource = "devices" def test_join_devices_negative_online(self, resource): with pytest.raises(Resour...
["Not Found"]
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_join.py
test_join_devices_negative_online
pytest.raises
variable
14
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError from notifiers.exceptions import ResourceError provider = "join" class TestJoinDevices: resource = "devices" def test_join_devices_negative_online(self, resource): with pytest.raises(
ResourceError)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_join.py
test_missing_required
assert
complex_expr
19
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError from notifiers.exceptions import ResourceError provider = "join" class TestJoin: @pytest.mark.parametrize( "data, message", [({}, "apikey"), ({"apikey": "foo"}, "message")] ) def test_m...
e.value.message
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_join.py
test_negative
pytest.raises
variable
15
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError from notifiers.exceptions import ResourceError provider = "join" class TestJoin: def test_negative(self, provider): data = {"message": "foo", "apikey": "bar"} rsp = provider.notify(**da...
NotificationError)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_join.py
test_defaults
assert
collection
13
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError from notifiers.exceptions import ResourceError provider = "join" class TestJoin: def test_defaults(self, provider): assert provider.defaults ==
{"deviceId": "group.all"}
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_join.py
test_negative
assert
collection
18
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError from notifiers.exceptions import ResourceError provider = "join" class TestJoin: def test_negative(self, provider): data = {"message": "foo", "apikey": "bar"} rsp = provider.notify(**da...
["User Not Authenticated"]
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_join.py
test_metadata
assert
collection
12
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError from notifiers.exceptions import ResourceError provider = "join" class TestJoin: def test_metadata(self, provider): assert provider.metadata ==
{ "base_url": "https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1", "name": "join", "site_url": "https://joaoapps.com/join/api/", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_join.py
test_join_devices_attribs
assert
collection
14
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError from notifiers.exceptions import ResourceError provider = "join" class TestJoinDevices: resource = "devices" def test_join_devices_attribs(self, resource): assert resource.schema ==
{ "type": "object", "properties": {"apikey": {"type": "string", "title": "user API key"}}, "additionalProperties": False, "required": ["apikey"], }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_mailgun.py
test_mailgun_error_response
assert
complex_expr
23
import pytest import datetime import time from email import utils from notifiers.exceptions import BadArguments from notifiers.core import FAILURE_STATUS provider = "mailgun" class TestMailgun: def test_mailgun_error_response(self, provider): data = { "api_key": "FOO", "message": ...
rsp.errors
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_mailgun.py
test_mailgun_error_response
assert
variable
22
import pytest import datetime import time from email import utils from notifiers.exceptions import BadArguments from notifiers.core import FAILURE_STATUS provider = "mailgun" class TestMailgun: def test_mailgun_error_response(self, provider): data = { "api_key": "FOO", "message": ...
FAILURE_STATUS
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_mailgun.py
test_mailgun_missing_required
pytest.raises
complex_expr
28
import pytest import datetime import time from email import utils from notifiers.exceptions import BadArguments from notifiers.core import FAILURE_STATUS provider = "mailgun" class TestMailgun: @pytest.mark.parametrize( "data, message", [ ({}, "to"), ({"to": "foo"}, "domai...
BadArguments, match=f"'{message}' is a required property")
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_mailgun.py
test_mailgun_metadata
assert
collection
13
import pytest import datetime import time from email import utils from notifiers.exceptions import BadArguments from notifiers.core import FAILURE_STATUS provider = "mailgun" class TestMailgun: def test_mailgun_metadata(self, provider): assert provider.metadata ==
{ "base_url": "https://api.mailgun.net/v3/{domain}/messages", "name": "mailgun", "site_url": "https://documentation.mailgun.com/", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_pagerduty.py
test_pagerduty_missing_required
pytest.raises
variable
35
import datetime import pytest from notifiers.exceptions import BadArguments provider = "pagerduty" class TestPagerDuty: @pytest.mark.parametrize( "data, message", [ ({}, "routing_key"), ({"routing_key": "foo"}, "event_action"), ({"routing_key": "foo", "event_...
BadArguments)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_pagerduty.py
test_pagerduty_missing_required
assert
complex_expr
37
import datetime import pytest from notifiers.exceptions import BadArguments provider = "pagerduty" class TestPagerDuty: @pytest.mark.parametrize( "data, message", [ ({}, "routing_key"), ({"routing_key": "foo"}, "event_action"), ({"routing_key": "foo", "event_...
e.value.message
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_pagerduty.py
test_pagerduty_sanity
assert
collection
23
import datetime import pytest from notifiers.exceptions import BadArguments provider = "pagerduty" class TestPagerDuty: @pytest.mark.online def test_pagerduty_sanity(self, provider, test_message): data = { "message": test_message, "event_action": "trigger", "sour...
{"status": "success", "message": "Event processed"}
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_pagerduty.py
test_pagerduty_metadata
assert
collection
12
import datetime import pytest from notifiers.exceptions import BadArguments provider = "pagerduty" class TestPagerDuty: def test_pagerduty_metadata(self, provider): assert provider.metadata ==
{ "base_url": "https://events.pagerduty.com/v2/enqueue", "name": "pagerduty", "site_url": "https://v2.developer.pagerduty.com/", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_popcornnotify.py
test_popcornnotify_error
assert
complex_expr
16
import pytest from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments, NotificationError provider = "popcornnotify" class TestPopcornNotify: def test_popcornnotify_error(self, provider): data = {"message": "foo", "api_key": "foo", "recipients": "foo@foo.com"} rsp ...
rsp.errors
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_popcornnotify.py
test_popcornnotify_missing_required
pytest.raises
variable
21
import pytest from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments, NotificationError provider = "popcornnotify" class TestPopcornNotify: @pytest.mark.parametrize( "data, message", [ ({}, "message"), ({"message": "foo"}, "api_key"), ...
BadArguments)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_popcornnotify.py
test_popcornnotify_error
assert
variable
14
import pytest from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments, NotificationError provider = "popcornnotify" class TestPopcornNotify: def test_popcornnotify_error(self, provider): data = {"message": "foo", "api_key": "foo", "recipients": "foo@foo.com"} rsp ...
FAILURE_STATUS
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_popcornnotify.py
test_popcornnotify_missing_required
assert
complex_expr
23
import pytest from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments, NotificationError provider = "popcornnotify" class TestPopcornNotify: @pytest.mark.parametrize( "data, message", [ ({}, "message"), ({"message": "foo"}, "api_key"), ...
e.value.message
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_popcornnotify.py
test_popcornnotify_error
pytest.raises
complex_expr
17
import pytest from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments, NotificationError provider = "popcornnotify" class TestPopcornNotify: def test_popcornnotify_error(self, provider): data = {"message": "foo", "api_key": "foo", "recipients": "foo@foo.com"} rsp ...
NotificationError, match=error)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_popcornnotify.py
test_popcornnotify_metadata
assert
collection
11
import pytest from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments, NotificationError provider = "popcornnotify" class TestPopcornNotify: def test_popcornnotify_metadata(self, provider): assert provider.metadata ==
{ "base_url": "https://popcornnotify.com/notify", "name": "popcornnotify", "site_url": "https://popcornnotify.com/", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_pushbullet.py
test_missing_required
pytest.raises
variable
17
import os import pytest from notifiers.exceptions import BadArguments provider = "pushbullet" class TestPushbullet: @pytest.mark.parametrize( "data, message", [({}, "message"), ({"message": "foo"}, "token")] ) def test_missing_required(self, data, message, provider): data["env_prefix"] ...
BadArguments)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_pushbullet.py
test_missing_required
assert
complex_expr
19
import os import pytest from notifiers.exceptions import BadArguments provider = "pushbullet" class TestPushbullet: @pytest.mark.parametrize( "data, message", [({}, "message"), ({"message": "foo"}, "token")] ) def test_missing_required(self, data, message, provider): data["env_prefix"] ...
e.value.message
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_pushbullet.py
test_metadata
assert
collection
12
import os import pytest from notifiers.exceptions import BadArguments provider = "pushbullet" class TestPushbullet: def test_metadata(self, provider): assert provider.metadata ==
{ "base_url": "https://api.pushbullet.com/v2/pushes", "name": "pushbullet", "site_url": "https://www.pushbullet.com", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_pushover.py
test_pushover_sounds_attribs
assert
variable
21
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "pushover" class TestPushoverSoundsResource: resource = "sounds" def test_pushover_sounds_attribs(self, resource): assert resource.schema == { "type": "object", ...
provider
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_pushover.py
test_missing_required
pytest.raises
variable
21
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "pushover" class TestPushover: @pytest.mark.parametrize( "data, message", [ ({}, "user"), ({"user": "foo"}, "message"), ({"user": "foo", "...
BadArguments)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_pushover.py
test_pushover_sounds_positive
assert
complex_expr
16
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "pushover" class TestPushoverCLI: @pytest.mark.online def test_pushover_sounds_positive(self, cli_runner): cmd = "pushover sounds".split() result = cli_runner(cmd) ...
result.output
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_pushover.py
test_missing_required
assert
complex_expr
23
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "pushover" class TestPushover: @pytest.mark.parametrize( "data, message", [ ({}, "user"), ({"user": "foo"}, "message"), ({"user": "foo", "...
e.value.message
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_pushover.py
test_pushover_priority_2_restrictions
pytest.raises
variable
22
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "pushover" class TestPushover: @pytest.mark.parametrize( "data, message", [({}, "expire"), ({"expire": 30}, "retry")] ) @pytest.mark.online def test_pushover_priority_2_r...
NotificationError)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_pushover.py
test_pushover_sounds_attribs
assert
collection
13
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "pushover" class TestPushoverSoundsResource: resource = "sounds" def test_pushover_sounds_attribs(self, resource): assert resource.schema ==
{ "type": "object", "properties": { "token": {"type": "string", "title": "your application's API token"} }, "required": ["token"], }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_pushover.py
test_pushover_metadata
assert
collection
12
import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "pushover" class TestPushover: def test_pushover_metadata(self, provider): assert provider.metadata ==
{ "base_url": "https://api.pushover.net/1/", "site_url": "https://pushover.net/", "name": "pushover", "message_url": "messages.json", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_simplepush.py
test_simplepush_missing_required
pytest.raises
variable
15
import pytest from notifiers.exceptions import BadArguments provider = "simplepush" class TestSimplePush: @pytest.mark.parametrize( "data, message", [({}, "key"), ({"key": "foo"}, "message")] ) def test_simplepush_missing_required(self, data, message, provider): data["env_prefix"] = "tes...
BadArguments)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_simplepush.py
test_simplepush_missing_required
assert
complex_expr
17
import pytest from notifiers.exceptions import BadArguments provider = "simplepush" class TestSimplePush: @pytest.mark.parametrize( "data, message", [({}, "key"), ({"key": "foo"}, "message")] ) def test_simplepush_missing_required(self, data, message, provider): data["env_prefix"] = "tes...
e.value.message
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_simplepush.py
test_simplepush_metadata
assert
collection
11
import pytest from notifiers.exceptions import BadArguments provider = "simplepush" class TestSimplePush: def test_simplepush_metadata(self, provider): assert provider.metadata ==
{ "base_url": "https://api.simplepush.io/send", "site_url": "https://simplepush.io/", "name": "simplepush", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_slack.py
test_slack_metadata
assert
collection
9
import pytest provider = "slack" class TestSlack: def test_slack_metadata(self, provider): assert provider.metadata ==
{ "base_url": "https://hooks.slack.com/services/", "name": "slack", "site_url": "https://api.slack.com/incoming-webhooks", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_smtp.py
test_attachment
assert
variable
30
from email.message import EmailMessage import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "email" class TestSMTP(object): def test_attachment(self, provider, tmpdir): dir_ = tmpdir.mkdir("sub") file_1 = dir_.join("foo.txt") ...
attachments
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_smtp.py
test_multiple_to
assert
string_literal
18
from email.message import EmailMessage import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "email" class TestSMTP(object): def test_multiple_to(self, provider): to = ["foo@foo.com", "bar@foo.com"] rsp = provider.notify( ...
",".join(to)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_smtp.py
test_attachment_mimetypes
assert
string_literal
25
from email.message import EmailMessage import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "email" class TestSMTP(object): def test_attachment_mimetypes(self, provider, tmpdir): dir_ = tmpdir.mkdir("sub") file_1 = dir_.join("...
"text/plain"
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_smtp.py
test_attachment_mimetypes
assert
string_literal
26
from email.message import EmailMessage import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "email" class TestSMTP(object): def test_attachment_mimetypes(self, provider, tmpdir): dir_ = tmpdir.mkdir("sub") file_1 = dir_.join("...
"image/jpeg"
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_smtp.py
test_smtp_missing_required
pytest.raises
variable
18
from email.message import EmailMessage import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "email" class TestSMTP(object): @pytest.mark.parametrize( "data, message", [({}, "message"), ({"message": "foo"}, "to")] ) def test_sm...
BadArguments)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_smtp.py
test_email_from_key
assert
string_literal
24
from email.message import EmailMessage import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "email" class TestSMTP(object): def test_email_from_key(self, provider): rsp = provider.notify( to="foo@foo.co ", from...
"bla@foo.com"
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_smtp.py
test_smtp_missing_required
assert
complex_expr
20
from email.message import EmailMessage import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "email" class TestSMTP(object): @pytest.mark.parametrize( "data, message", [({}, "message"), ({"message": "foo"}, "to")] ) def test_sm...
e.value.message
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_smtp.py
test_attachment_mimetypes
assert
string_literal
27
from email.message import EmailMessage import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "email" class TestSMTP(object): def test_attachment_mimetypes(self, provider, tmpdir): dir_ = tmpdir.mkdir("sub") file_1 = dir_.join("...
"application/pdf"
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_smtp.py
test_smtp_no_host
pytest.raises
variable
21
from email.message import EmailMessage import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "email" class TestSMTP(object): def test_smtp_no_host(self, provider): data = { "to": "foo@foo.com", "message": "bar",...
NotificationError)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_smtp.py
test_smtp_metadata
assert
collection
14
from email.message import EmailMessage import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "email" class TestSMTP(object): def test_smtp_metadata(self, provider): assert provider.metadata ==
{ "base_url": None, "name": "email", "site_url": "https://en.wikipedia.org/wiki/Email", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_statuspage.py
test_statuspage_components_attribs
assert
variable
48
import datetime import logging import os from time import sleep import pytest import requests from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments from notifiers.exceptions import ResourceError provider = "statuspage" log = logging.getLogger("statuspage") def close_all_open_incid...
provider
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_statuspage.py
test_errors
assert
complex_expr
40
import datetime import logging import os from time import sleep import pytest import requests from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments from notifiers.exceptions import ResourceError provider = "statuspage" log = logging.getLogger("statuspage") def close_all_open_incid...
rsp.errors
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_statuspage.py
test_statuspage_components_negative
pytest.raises
variable
38
import datetime import logging import os from time import sleep import pytest import requests from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments from notifiers.exceptions import ResourceError provider = "statuspage" log = logging.getLogger("statuspage") def close_all_open_incid...
BadArguments)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_statuspage.py
test_errors
assert
variable
39
import datetime import logging import os from time import sleep import pytest import requests from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments from notifiers.exceptions import ResourceError provider = "statuspage" log = logging.getLogger("statuspage") def close_all_open_incid...
FAILURE_STATUS
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_statuspage.py
test_data_dependencies
pytest.raises
complex_expr
69
import datetime import logging import os from time import sleep import pytest import requests from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments from notifiers.exceptions import ResourceError provider = "statuspage" log = logging.getLogger("statuspage") def close_all_open_incid...
BadArguments, match=message)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_statuspage.py
test_statuspage_components_attribs
assert
collection
49
import datetime import logging import os from time import sleep import pytest import requests from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments from notifiers.exceptions import ResourceError provider = "statuspage" log = logging.getLogger("statuspage") def close_all_open_incid...
{"required": ["api_key", "page_id"]}
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_statuspage.py
test_statuspage_components_negative
pytest.raises
complex_expr
41
import datetime import logging import os from time import sleep import pytest import requests from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments from notifiers.exceptions import ResourceError provider = "statuspage" log = logging.getLogger("statuspage") def close_all_open_incid...
ResourceError, match="Could not authenticate")
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_statuspage.py
test_missing_required
pytest.raises
complex_expr
46
import datetime import logging import os from time import sleep import pytest import requests from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments from notifiers.exceptions import ResourceError provider = "statuspage" log = logging.getLogger("statuspage") def close_all_open_incid...
BadArguments, match=f"'{message}' is a required property")
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_statuspage.py
test_metadata
assert
collection
36
import datetime import logging import os from time import sleep import pytest import requests from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments from notifiers.exceptions import ResourceError provider = "statuspage" log = logging.getLogger("statuspage") def close_all_open_incid...
{ "base_url": "https://api.statuspage.io/v1//pages/{page_id}/", "name": "statuspage", "site_url": "https://statuspage.io", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_statuspage.py
test_statuspage_components_attribs
assert
collection
38
import datetime import logging import os from time import sleep import pytest import requests from notifiers.core import FAILURE_STATUS from notifiers.exceptions import BadArguments from notifiers.exceptions import ResourceError provider = "statuspage" log = logging.getLogger("statuspage") def close_all_open_incid...
{ "additionalProperties": False, "properties": { "api_key": {"title": "OAuth2 token", "type": "string"}, "page_id": {"title": "Page ID", "type": "string"}, }, "required": ["api_key", "page_id"], "type": "object", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_telegram.py
test_telegram_updates_attribs
assert
variable
21
import json import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "telegram" class TestTelegramResources: resource = "updates" def test_telegram_updates_attribs(self, resource): assert resource.schema == { "additionalPr...
provider
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_telegram.py
test_missing_required
pytest.raises
variable
23
import json import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "telegram" class TestTelegram: @pytest.mark.parametrize( "data, message", [ ({}, "message"), ({"message": "foo"}, "chat_id"), ...
BadArguments)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_telegram.py
test_missing_required
assert
complex_expr
25
import json import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "telegram" class TestTelegram: @pytest.mark.parametrize( "data, message", [ ({}, "message"), ({"message": "foo"}, "chat_id"), ...
e.value.message
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_telegram.py
test_bad_token
pytest.raises
variable
15
import json import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "telegram" class TestTelegram: def test_bad_token(self, provider): data = {"token": "foo", "chat_id": 1, "message": "foo"} with pytest.raises(
NotificationError)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_telegram.py
test_telegram_updates_attribs
assert
collection
22
import json import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "telegram" class TestTelegramResources: resource = "updates" def test_telegram_updates_attribs(self, resource): assert resource.schema == { "additionalPr...
{"required": ["token"]}
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_telegram.py
test_metadata
assert
collection
14
import json import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "telegram" class TestTelegram: def test_metadata(self, provider): assert provider.metadata ==
{ "base_url": "https://api.telegram.org/bot{token}", "name": "telegram", "site_url": "https://core.telegram.org/", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_telegram.py
test_telegram_updates_attribs
assert
collection
15
import json import pytest from notifiers.exceptions import BadArguments from notifiers.exceptions import NotificationError provider = "telegram" class TestTelegramResources: resource = "updates" def test_telegram_updates_attribs(self, resource): assert resource.schema ==
{ "additionalProperties": False, "properties": {"token": {"title": "Bot token", "type": "string"}}, "required": ["token"], "type": "object", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_twilio.py
test_twilio_metadata
assert
collection
8
import pytest provider = "twilio" class TestTwilio: def test_twilio_metadata(self, provider): assert provider.metadata ==
{ "base_url": "https://api.twilio.com/2010-04-01/Accounts/{}/Messages.json", "name": "twilio", "site_url": "https://www.twilio.com/", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_zulip.py
test_zulip_type_key
assert
string_literal
24
import datetime import pytest from notifiers.exceptions import BadArguments, NotifierException provider = "zulip" class TestZulip: def test_zulip_type_key(self, provider): rsp = provider.notify( email="foo@foo.com", api_key="bar", to="baz", domain="bla", ...
"private"
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_zulip.py
test_missing_required
pytest.raises
variable
34
import datetime import pytest from notifiers.exceptions import BadArguments, NotifierException provider = "zulip" class TestZulip: @pytest.mark.parametrize( "data, message", [ ( {"email": "foo", "api_key": "bar", "message": "boo", "to": "bla"}, "domai...
BadArguments)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_zulip.py
test_missing_required
assert
complex_expr
36
import datetime import pytest from notifiers.exceptions import BadArguments, NotifierException provider = "zulip" class TestZulip: @pytest.mark.parametrize( "data, message", [ ( {"email": "foo", "api_key": "bar", "message": "boo", "to": "bla"}, "domai...
e.value.message
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_zulip.py
test_zulip_missing_subject
pytest.raises
variable
13
import datetime import pytest from notifiers.exceptions import BadArguments, NotifierException provider = "zulip" class TestZulip: def test_zulip_missing_subject(self, provider): with pytest.raises(
NotifierException)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/providers/test_zulip.py
test_metadata
assert
collection
12
import datetime import pytest from notifiers.exceptions import BadArguments, NotifierException provider = "zulip" class TestZulip: def test_metadata(self, provider): assert provider.metadata ==
{ "base_url": "https://{domain}.zulipchat.com", "site_url": "https://zulipchat.com/api/", "name": "zulip", }
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_cli.py
test_notify_sanity
assert
complex_expr
19
import re import pytest import notifiers mock_name = "mock_provider" class TestCLI: def test_notify_sanity(self, cli_runner): """Test valid notification usage""" cmd = f"{mock_name} notify --required bar foo".split() result = cli_runner(cmd) assert ( not result.exit_...
result.output
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_cli.py
test_version_command
assert
complex_expr
17
import re import pytest import notifiers mock_name = "mock_provider" class TestCLI: def test_version_command(self, cli_runner): result = cli_runner(["--version"]) assert not result.exit_code version_re = re.search(r"(\d+\.\d+\.\d+)", result.output) assert version_re ass...
notifiers.__version__
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_sanity
assert
none_literal
49
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
None
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_environs
assert
string_literal
24
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
"foo"
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_provided_data_takes_precedence_over_environ
assert
string_literal
26
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
"bar"
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_resources
assert
variable
22
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
resources
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_bad_integration
pytest.raises
variable
20
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
TypeError)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_error_response
assert
collection
28
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
["an error"]
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_bad_integration
assert
func_call
22
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
str(e.value)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_bad_schema
pytest.raises
variable
20
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
SchemaError)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_resources
pytest.raises
variable
45
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
BadArguments)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_environs
assert
variable
23
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
SUCCESS_STATUS
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_resources
assert
string_literal
31
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
"mock_resource"
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_error_response
assert
complex_expr
35
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
mock_provider.name
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_error_response
pytest.raises
variable
24
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
NotificationError)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_all_providers
assert
func_call
26
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
notifiers.all_providers()
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_core.py
test_sanity
assert
collection
45
import pytest import notifiers from notifiers import notify from notifiers.core import Provider, Response, SUCCESS_STATUS from notifiers.exceptions import ( BadArguments, SchemaError, NotificationError, NoSuchNotifierError, ) class TestCore: valid_data = {"required": "foo", "not_required": ["foo"...
{"required": ["required"]}
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_json_schema.py
test_format_negative
pytest.raises
variable
30
import hypothesis.strategies as st import pytest from hypothesis import given from jsonschema import validate, ValidationError from notifiers.utils.schema.formats import format_checker from notifiers.utils.schema.helpers import one_or_more, list_to_commas class TestFormats: @pytest.mark.parametrize( "for...
ValidationError)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_json_schema.py
test_list_to_commas
assert
string_literal
14
import hypothesis.strategies as st import pytest from hypothesis import given from jsonschema import validate, ValidationError from notifiers.utils.schema.formats import format_checker from notifiers.utils.schema.helpers import one_or_more, list_to_commas class TestSchemaUtils: @given(st.lists(st.text())) de...
",".join(input_data)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_logger.py
test_missing_provider
pytest.raises
variable
13
import logging from notifiers.exceptions import NoSuchNotifierError import pytest log = logging.getLogger("test_logger") class TestLogger: def test_missing_provider(self, handler): with pytest.raises(
NoSuchNotifierError)
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_logger.py
test_with_error
assert
func_call
16
import logging from notifiers.exceptions import NoSuchNotifierError import pytest log = logging.getLogger("test_logger") class TestLogger: def test_with_error(self, mock_provider, handler, capsys): hdlr = handler(mock_provider.name, logging.INFO) log.addHandler(hdlr) log.info("test") ...
capsys.readouterr().err
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_logger.py
test_valid_logging
assert
string_literal
15
import logging from notifiers.exceptions import NoSuchNotifierError import pytest log = logging.getLogger("test_logger") class TestLogger: def test_valid_logging(self, magic_mock_provider, handler): hdlr = handler(magic_mock_provider.name, logging.INFO) log.addHandler(hdlr) assert repr...
"<NotificationHandler magic_mock(INFO)>"
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_utils.py
test_file_list_for_request
assert
numeric_literal
23
import pytest from notifiers.utils.helpers import ( text_to_bool, merge_dicts, dict_from_environs, snake_to_camel_case, valid_file, ) from notifiers.utils.requests import file_list_for_request class TestHelpers: def test_file_list_for_request(self, tmpdir): file_1 = tmpdir.join("file_...
2
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_utils.py
test_text_to_bool
assert
variable
30
import pytest from notifiers.utils.helpers import ( text_to_bool, merge_dicts, dict_from_environs, snake_to_camel_case, valid_file, ) from notifiers.utils.requests import file_list_for_request class TestHelpers: @pytest.mark.parametrize( "text, result", [ ("y", True...
result
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
liiight/notifiers
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
train
train
tests/test_utils.py
test_snake_to_camel_case
assert
variable
24
import pytest from notifiers.utils.helpers import ( text_to_bool, merge_dicts, dict_from_environs, snake_to_camel_case, valid_file, ) from notifiers.utils.requests import file_list_for_request class TestHelpers: @pytest.mark.parametrize( "snake_value, cc_value", [ ...
cc_value
227dfad9107dce0a4f6b57f8fc827c43f6d70b38
72
v2_extractor_at_anchor
llimllib/limbo
b8039fe716a31609c827f7b5f8f930248dee485c
39
train
train
test/test_cmd.py
test_cmd
assert
numeric_literal
26
import os import shlex import subprocess import sys DIR = os.path.dirname(os.path.realpath(__file__)) TESTPLUGINS = os.path.join(DIR, "plugins") def sh(cmd): # slex.split can only handle unicode strings in python3, and only byte # strings in python2 if sys.version_info[0] > 2: cmd = cmd.decode("ut...
0
b8039fe716a31609c827f7b5f8f930248dee485c
39
v2_extractor_at_anchor
llimllib/limbo
b8039fe716a31609c827f7b5f8f930248dee485c
39
train
train
test/test_cmd.py
test_cmd
assert
variable
25
import os import shlex import subprocess import sys DIR = os.path.dirname(os.path.realpath(__file__)) TESTPLUGINS = os.path.join(DIR, "plugins") def sh(cmd): # slex.split can only handle unicode strings in python3, and only byte # strings in python2 if sys.version_info[0] > 2: cmd = cmd.decode("ut...
msg
b8039fe716a31609c827f7b5f8f930248dee485c
39
v2_extractor_at_anchor