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
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/taskapp/tests/test_celery.py
test
assert
numeric_literal
11
import pytest from .. import celery pytestmark = pytest.mark.django_db class TestSuccessfulTask: def test(self, caplog): celery.successful_task(foo="bar") assert len(caplog.records) ==
1
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/taskapp/tests/test_celery.py
test_other_tasks_not_corrupted
assert
numeric_literal
29
import pytest from .. import celery pytestmark = pytest.mark.django_db class TestCorruptRejectedTask: def test(self, caplog): task_id = "11111111-1111-1111-1111-111111111111" headers = dict( id=task_id, task="django_structlog_demo_project.taskapp.celery.rejected_task", ...
0
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/taskapp/tests/test_celery.py
test_other_tasks_not_corrupted
assert
string_literal
30
import pytest from .. import celery pytestmark = pytest.mark.django_db class TestCorruptRejectedTask: def test(self, caplog): task_id = "11111111-1111-1111-1111-111111111111" headers = dict( id=task_id, task="django_structlog_demo_project.taskapp.celery.rejected_task", ...
"django_structlog_demo_project.taskapp.celery.successful_task"
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/users/tests/test_forms.py
test_clean_username
assert
numeric_literal
39
import pytest from django_structlog_demo_project.users.forms import UserCreationForm from django_structlog_demo_project.users.tests.factories import UserFactory pytestmark = pytest.mark.django_db class TestUserCreationForm: def test_clean_username(self): # A user with proto_user params does not exist yet...
1
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/users/tests/test_forms.py
test_clean_username
assert
complex_expr
40
import pytest from django_structlog_demo_project.users.forms import UserCreationForm from django_structlog_demo_project.users.tests.factories import UserFactory pytestmark = pytest.mark.django_db class TestUserCreationForm: def test_clean_username(self): # A user with proto_user params does not exist yet...
form.errors
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/users/tests/test_forms.py
test_clean_username
assert
complex_expr
23
import pytest from django_structlog_demo_project.users.forms import UserCreationForm from django_structlog_demo_project.users.tests.factories import UserFactory pytestmark = pytest.mark.django_db class TestUserCreationForm: def test_clean_username(self): # A user with proto_user params does not exist yet...
proto_user.username
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/users/tests/test_models.py
test_user_get_absolute_url
assert
string_literal
8
import pytest from django.conf import settings pytestmark = pytest.mark.django_db def test_user_get_absolute_url(user: settings.AUTH_USER_MODEL): assert user.get_absolute_url() ==
"/users/{username}/".format( username=user.username )
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/users/tests/test_urls.py
test_detail
assert
variable
10
import pytest from django.conf import settings from django.urls import reverse, resolve pytestmark = pytest.mark.django_db def test_detail(user: settings.AUTH_USER_MODEL): route = f"/users/{user.username}/" assert reverse("users:detail", kwargs={"username": user.username}) ==
route
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/users/tests/test_urls.py
test_list
assert
string_literal
9
import pytest from django.conf import settings from django.urls import reverse, resolve pytestmark = pytest.mark.django_db def test_list(): assert reverse("users:list") ==
"/users/"
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/users/tests/test_urls.py
test_list
assert
string_literal
10
import pytest from django.conf import settings from django.urls import reverse, resolve pytestmark = pytest.mark.django_db def test_list(): assert reverse("users:list") == "/users/" assert resolve("/users/").view_name ==
"users:list"
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/users/tests/test_urls.py
test_detail
assert
string_literal
11
import pytest from django.conf import settings from django.urls import reverse, resolve pytestmark = pytest.mark.django_db def test_detail(user: settings.AUTH_USER_MODEL): route = f"/users/{user.username}/" assert reverse("users:detail", kwargs={"username": user.username}) == route assert resolve(route)....
"users:detail"
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/users/tests/test_urls.py
test_update
assert
string_literal
10
import pytest from django.conf import settings from django.urls import reverse, resolve pytestmark = pytest.mark.django_db def test_update(): assert reverse("users:update") == "/users/~update/" assert resolve("/users/~update/").view_name ==
"users:update"
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/users/tests/test_urls.py
test_redirect
assert
string_literal
10
import pytest from django.conf import settings from django.urls import reverse, resolve pytestmark = pytest.mark.django_db def test_redirect(): assert reverse("users:redirect") == "/users/~redirect/" assert resolve("/users/~redirect/").view_name ==
"users:redirect"
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/users/tests/test_urls.py
test_update
assert
string_literal
9
import pytest from django.conf import settings from django.urls import reverse, resolve pytestmark = pytest.mark.django_db def test_update(): assert reverse("users:update") ==
"/users/~update/"
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/users/tests/test_urls.py
test_redirect
assert
string_literal
9
import pytest from django.conf import settings from django.urls import reverse, resolve pytestmark = pytest.mark.django_db def test_redirect(): assert reverse("users:redirect") ==
"/users/~redirect/"
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/users/tests/test_views.py
test_get_object
assert
variable
21
import pytest from django.conf import settings from django.test import RequestFactory from django_structlog_demo_project.users.views import UserRedirectView, UserUpdateView pytestmark = pytest.mark.django_db class TestUserUpdateView: def test_get_object( self, user: settings.AUTH_USER_MODEL, request_fac...
user
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
django_structlog_demo_project/users/tests/test_views.py
test_get_success_url
assert
string_literal
21
import pytest from django.conf import settings from django.test import RequestFactory from django_structlog_demo_project.users.views import UserRedirectView, UserUpdateView pytestmark = pytest.mark.django_db class TestUserUpdateView: def test_get_success_url( self, user: settings.AUTH_USER_MODEL, reques...
"/users/{username}/".format( username=user.username )
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/celery/test_receivers.py
test_receiver_before_task_publish_celery_protocol_v2
self.assertDictEqual
variable
35
import logging from signal import SIGTERM from unittest.mock import Mock, patch, call, MagicMock import structlog from celery import shared_task from django.contrib.auth.models import AnonymousUser from django.dispatch import receiver from django.test import TestCase, RequestFactory from django_structlog.celery impor...
headers)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/celery/test_receivers.py
test_receiver_task_pre_run
self.assertDictEqual
variable
36
import logging from signal import SIGTERM from unittest.mock import Mock, patch, call, MagicMock import structlog from celery import shared_task from django.contrib.auth.models import AnonymousUser from django.dispatch import receiver from django.test import TestCase, RequestFactory from django_structlog.celery impor...
context)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/celery/test_receivers.py
test_signal_bind_extra_task_metadata
self.assertEqual
variable
45
import logging from signal import SIGTERM from unittest.mock import Mock, patch, call, MagicMock import structlog from celery import shared_task from django.contrib.auth.models import AnonymousUser from django.dispatch import receiver from django.test import TestCase, RequestFactory from django_structlog.celery impor...
task_id)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/celery/test_receivers.py
test_defer_task
self.assertIn
complex_expr
50
import logging from signal import SIGTERM from unittest.mock import Mock, patch, call, MagicMock import structlog from celery import shared_task from django.contrib.auth.models import AnonymousUser from django.dispatch import receiver from django.test import TestCase, RequestFactory from django_structlog.celery impor...
record.msg)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/celery/test_steps.py
test_call
assert_*
collection
38
from unittest.mock import patch, call from django.test import TestCase from django_structlog.celery import steps class TestDjangoStructLogInitStep(TestCase): def test_call(self): from celery.signals import ( before_task_publish, after_task_publish, task_prerun, ...
[ call(before_task_publish, receiver_before_task_publish), call(after_task_publish, receiver_after_task_publish), call(task_prerun, receiver_task_pre_run), call(task_retry, receiver_task_retry), call(task_success, receiver_task_success), call(task_failure, receiver_task_failure), call(task_revoked, receiver_task_revoke...
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/middlewares/test_request.py
test_process_request_user
self.assertIsInstance
variable
70
import logging import traceback import uuid from unittest import mock from unittest.mock import patch, Mock from django.contrib.auth.models import AnonymousUser, User from django.contrib.sites.models import Site from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import PermissionDe...
int)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/middlewares/test_request.py
test_process_request_user_uuid
self.assertIsInstance
variable
68
import logging import traceback import uuid from unittest import mock from unittest.mock import patch, Mock from django.contrib.auth.models import AnonymousUser, User from django.contrib.sites.models import Site from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import PermissionDe...
str)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/middlewares/test_request.py
test_process_request_error
self.assertEqual
numeric_literal
84
import logging import traceback import uuid from unittest import mock from unittest.mock import patch, Mock from django.contrib.auth.models import AnonymousUser, User from django.contrib.sites.models import Site from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import PermissionDe...
500)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/middlewares/test_request.py
test_process_request_403_are_processed_as_regular_requests
self.assertEqual
numeric_literal
81
import logging import traceback import uuid from unittest import mock from unittest.mock import patch, Mock from django.contrib.auth.models import AnonymousUser, User from django.contrib.sites.models import Site from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import PermissionDe...
403)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/middlewares/test_request.py
test_process_request_404_are_processed_as_regular_requests
self.assertEqual
numeric_literal
81
import logging import traceback import uuid from unittest import mock from unittest.mock import patch, Mock from django.contrib.auth.models import AnonymousUser, User from django.contrib.sites.models import Site from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import PermissionDe...
404)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/middlewares/test_request.py
test_process_request_without_user
self.assertIn
complex_expr
64
import logging import traceback import uuid from unittest import mock from unittest.mock import patch, Mock from django.contrib.auth.models import AnonymousUser, User from django.contrib.sites.models import Site from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import PermissionDe...
record.msg)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/test_app_settings.py
test_celery_enabled
self.assertTrue
complex_expr
11
from django.test import TestCase from django_structlog import app_settings class TestAppSettings(TestCase): def test_celery_enabled(self): settings = app_settings.AppSettings() with self.settings(DJANGO_STRUCTLOG_CELERY_ENABLED=True): self.assertTrue(
settings.CELERY_ENABLED)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/test_commands.py
test_command
self.assertIn
complex_expr
26
import logging import structlog from django.test import TestCase from django.core.management import BaseCommand, call_command from django_extensions.management.utils import signalcommand class TestCommands(TestCase): def test_command(self): class Command(BaseCommand): @signalcommand ...
record.msg)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/test_commands.py
test_command
self.assertLogs
complex_expr
16
import logging import structlog from django.test import TestCase from django.core.management import BaseCommand, call_command from django_extensions.management.utils import signalcommand class TestCommands(TestCase): def test_command(self): class Command(BaseCommand): @signalcommand ...
logging.INFO)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/test_commands.py
test_nested_command
self.assertIn
complex_expr
37
import logging import structlog from django.test import TestCase from django.core.management import BaseCommand, call_command from django_extensions.management.utils import signalcommand class TestCommands(TestCase): def test_nested_command(self): class Command(BaseCommand): @signalcommand ...
command_event_1.msg)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jrobichaud/django-structlog
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
train
train
test_app/tests/test_commands.py
test_nested_command
self.assertIn
complex_expr
40
import logging import structlog from django.test import TestCase from django.core.management import BaseCommand, call_command from django_extensions.management.utils import signalcommand class TestCommands(TestCase): def test_nested_command(self): class Command(BaseCommand): @signalcommand ...
command_event_2.msg)
c0c333b15e56ccc28ee459fb046ced74e4ff44a2
63
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_algorithm.py
test_get_ssh_version
assert
string_literal
24
import pytest from ssh_audit.algorithm import Algorithm from ssh_audit.timeframe import Timeframe class TestAlgorithm: def init(self, ssh_audit): self.algorithm = Algorithm self.timeframe = Timeframe def _tf(self, v, s=None): return self.timeframe().update(v, s) def test_get_ssh...
''
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_algorithm.py
test_timeframe_object
assert
variable
18
import pytest from ssh_audit.algorithm import Algorithm from ssh_audit.timeframe import Timeframe class TestAlgorithm: def init(self, ssh_audit): self.algorithm = Algorithm self.timeframe = Timeframe def _tf(self, v, s=None): return self.timeframe().update(v, s) def test_timefra...
tf
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_algorithm.py
test_get_since_text
assert
none_literal
25
import pytest from ssh_audit.algorithm import Algorithm from ssh_audit.timeframe import Timeframe class TestAlgorithm: def init(self, ssh_audit): self.algorithm = Algorithm self.timeframe = Timeframe def _tf(self, v, s=None): return self.timeframe().update(v, s) def test_get_sin...
None
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_algorithm.py
cmp_tf
assert
func_call
17
import pytest from ssh_audit.algorithm import Algorithm from ssh_audit.timeframe import Timeframe class TestAlgorithm: def init(self, ssh_audit): self.algorithm = Algorithm self.timeframe = Timeframe def _tf(self, v, s=None): return self.timeframe().update(v, s) def cmp_tf(v...
str(r)
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_algorithm.py
test_timeframe_creation
assert
func_call
100
import pytest from ssh_audit.algorithm import Algorithm from ssh_audit.timeframe import Timeframe class TestAlgorithm: def init(self, ssh_audit): self.algorithm = Algorithm self.timeframe = Timeframe def _tf(self, v, s=None): return self.timeframe().update(v, s) def test_timefra...
len(str(tf2))
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_algorithm.py
test_get_ssh_version
assert
collection
21
import pytest from ssh_audit.algorithm import Algorithm from ssh_audit.timeframe import Timeframe class TestAlgorithm: def init(self, ssh_audit): self.algorithm = Algorithm self.timeframe = Timeframe def _tf(self, v, s=None): return self.timeframe().update(v, s) def test_get_ssh...
('OpenSSH', '7.5', True)
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_algorithm.py
test_get_ssh_version
assert
collection
20
import pytest from ssh_audit.algorithm import Algorithm from ssh_audit.timeframe import Timeframe class TestAlgorithm: def init(self, ssh_audit): self.algorithm = Algorithm self.timeframe = Timeframe def _tf(self, v, s=None): return self.timeframe().update(v, s) def test_get_ssh...
('OpenSSH', '7.5', False)
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_algorithm.py
test_get_ssh_version
assert
collection
23
import pytest from ssh_audit.algorithm import Algorithm from ssh_audit.timeframe import Timeframe class TestAlgorithm: def init(self, ssh_audit): self.algorithm = Algorithm self.timeframe = Timeframe def _tf(self, v, s=None): return self.timeframe().update(v, s) def test_get_ssh...
('libssh', '0.7.4', False)
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_algorithm.py
test_get_since_text
assert
string_literal
20
import pytest from ssh_audit.algorithm import Algorithm from ssh_audit.timeframe import Timeframe class TestAlgorithm: def init(self, ssh_audit): self.algorithm = Algorithm self.timeframe = Timeframe def _tf(self, v, s=None): return self.timeframe().update(v, s) def test_get_sin...
'available since OpenSSH 7.5'
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_algorithm.py
test_get_ssh_version
assert
collection
22
import pytest from ssh_audit.algorithm import Algorithm from ssh_audit.timeframe import Timeframe class TestAlgorithm: def init(self, ssh_audit): self.algorithm = Algorithm self.timeframe = Timeframe def _tf(self, v, s=None): return self.timeframe().update(v, s) def test_get_ssh...
('Dropbear SSH', '2016.74', False)
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_algorithm.py
test_get_since_text
assert
string_literal
23
import pytest from ssh_audit.algorithm import Algorithm from ssh_audit.timeframe import Timeframe class TestAlgorithm: def init(self, ssh_audit): self.algorithm = Algorithm self.timeframe = Timeframe def _tf(self, v, s=None): return self.timeframe().update(v, s) def test_get_sin...
'available since Dropbear SSH 2016.73'
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_auditconf.py
test_audit_conf_ip_version_preference
assert
collection
70
import pytest from ssh_audit.ssh_audit import process_commandline class TestAuditConf: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer() self.usage = ssh_audit.usage self.process_commandline = process_commandline def _...
[]
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_auditconf.py
test_audit_conf_ip_version_preference
assert
collection
45
import pytest from ssh_audit.ssh_audit import process_commandline class TestAuditConf: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer() self.usage = ssh_audit.usage self.process_commandline = process_commandline def _...
[4]
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_auditconf.py
test_audit_conf_ip_version_preference
assert
collection
51
import pytest from ssh_audit.ssh_audit import process_commandline class TestAuditConf: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer() self.usage = ssh_audit.usage self.process_commandline = process_commandline def _...
[6]
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_auditconf.py
test_audit_conf_ip_version_preference
assert
bool_literal
43
import pytest from ssh_audit.ssh_audit import process_commandline class TestAuditConf: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer() self.usage = ssh_audit.usage self.process_commandline = process_commandline def _...
True
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_auditconf.py
test_audit_conf_port
assert
variable
43
import pytest from ssh_audit.ssh_audit import process_commandline class TestAuditConf: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer() self.usage = ssh_audit.usage self.process_commandline = process_commandline def _...
port
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_auditconf.py
test_audit_conf_level
assert
variable
43
import pytest from ssh_audit.ssh_audit import process_commandline class TestAuditConf: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer() self.usage = ssh_audit.usage self.process_commandline = process_commandline def _...
level
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_auditconf.py
test_audit_conf_booleans
assert
bool_literal
47
import pytest from ssh_audit.ssh_audit import process_commandline class TestAuditConf: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer() self.usage = ssh_audit.usage self.process_commandline = process_commandline def _...
False
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_auditconf.py
test_audit_conf_port
pytest.raises
variable
45
import pytest from ssh_audit.ssh_audit import process_commandline class TestAuditConf: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer() self.usage = ssh_audit.usage self.process_commandline = process_commandline def _...
ValueError)
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_auditconf.py
test_audit_conf_process_commandline
pytest.raises
variable
42
import pytest from ssh_audit.ssh_audit import process_commandline class TestAuditConf: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer() self.usage = ssh_audit.usage self.process_commandline = process_commandline def _...
SystemExit)
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_auditconf.py
_test_conf
assert
complex_expr
29
import pytest from ssh_audit.ssh_audit import process_commandline class TestAuditConf: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer() self.usage = ssh_audit.usage self.process_commandline = process_commandline @stat...
options['host']
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_auditconf.py
_test_conf
assert
complex_expr
30
import pytest from ssh_audit.ssh_audit import process_commandline class TestAuditConf: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer() self.usage = ssh_audit.usage self.process_commandline = process_commandline @stat...
options['port']
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_auditconf.py
_test_conf
assert
complex_expr
31
import pytest from ssh_audit.ssh_audit import process_commandline class TestAuditConf: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer() self.usage = ssh_audit.usage self.process_commandline = process_commandline @stat...
options['ssh1']
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_auditconf.py
_test_conf
assert
complex_expr
32
import pytest from ssh_audit.ssh_audit import process_commandline class TestAuditConf: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer() self.usage = ssh_audit.usage self.process_commandline = process_commandline @stat...
options['ssh2']
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_banner.py
test_banners_with_spaces
assert
variable
14
import pytest from ssh_audit.banner import Banner class TestBanner: def init(self, ssh_audit): self.banner = Banner def test_banners_with_spaces(self): b = lambda x: self.banner.parse(x) # noqa s = 'SSH-2.0-OpenSSH_4.3p2' assert str(b('SSH-2.0-OpenSSH_4.3p2 ')) ==
s
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_banner.py
test_banners_without_software
assert
string_literal
18
import pytest from ssh_audit.banner import Banner class TestBanner: def init(self, ssh_audit): self.banner = Banner def test_banners_without_software(self): b = lambda x: self.banner.parse(x) # noqa assert b('SSH-2.0').protocol == (2, 0) assert b('SSH-2.0').software is None ...
''
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_banner.py
test_simple_banners
assert
none_literal
16
import pytest from ssh_audit.banner import Banner class TestBanner: def init(self, ssh_audit): self.banner = Banner def test_simple_banners(self): banner = lambda x: self.banner.parse(x) # noqa b = banner('SSH-2.0-OpenSSH_7.3') assert b.protocol == (2, 0) assert b.so...
None
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_banner.py
test_simple_banners
assert
collection
14
import pytest from ssh_audit.banner import Banner class TestBanner: def init(self, ssh_audit): self.banner = Banner def test_simple_banners(self): banner = lambda x: self.banner.parse(x) # noqa b = banner('SSH-2.0-OpenSSH_7.3') assert b.protocol ==
(2, 0)
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_banner.py
test_simple_banners
assert
collection
24
import pytest from ssh_audit.banner import Banner class TestBanner: def init(self, ssh_audit): self.banner = Banner def test_simple_banners(self): banner = lambda x: self.banner.parse(x) # noqa b = banner('SSH-2.0-OpenSSH_7.3') assert b.protocol == (2, 0) assert b.so...
(1, 5)
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_banner.py
test_banners_with_multiple_protocols
assert
string_literal
15
import pytest from ssh_audit.banner import Banner class TestBanner: def init(self, ssh_audit): self.banner = Banner def test_banners_with_multiple_protocols(self): b = lambda x: self.banner.parse(x) # noqa assert str(b('SSH-1.99-SSH-1.99-OpenSSH_3.6.1p2')) == 'SSH-1.99-OpenSSH_3.6.1...
'SSH-1.99-dropbear_0.5'
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_banner.py
test_banners_with_multiple_protocols
assert
string_literal
17
import pytest from ssh_audit.banner import Banner class TestBanner: def init(self, ssh_audit): self.banner = Banner def test_banners_with_multiple_protocols(self): b = lambda x: self.banner.parse(x) # noqa assert str(b('SSH-1.99-SSH-1.99-OpenSSH_3.6.1p2')) == 'SSH-1.99-OpenSSH_3.6.1...
'SSH-1.99-OpenSSH_3.9p1'
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_banner.py
test_banners_with_multiple_protocols
assert
string_literal
13
import pytest from ssh_audit.banner import Banner class TestBanner: def init(self, ssh_audit): self.banner = Banner def test_banners_with_multiple_protocols(self): b = lambda x: self.banner.parse(x) # noqa assert str(b('SSH-1.99-SSH-1.99-OpenSSH_3.6.1p2')) ==
'SSH-1.99-OpenSSH_3.6.1p2'
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_buffer.py
test_unread
assert
numeric_literal
23
import re import pytest from ssh_audit.readbuf import ReadBuf from ssh_audit.writebuf import WriteBuf class TestBuffer: def init(self, ssh_audit): self.rbuf = ReadBuf self.wbuf = WriteBuf self.utf8rchar = b'\xef\xbf\xbd' def _b(cls, v): v = re.sub(r'\s', '', v) data =...
5
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_buffer.py
test_unread
assert
numeric_literal
25
import re import pytest from ssh_audit.readbuf import ReadBuf from ssh_audit.writebuf import WriteBuf class TestBuffer: def init(self, ssh_audit): self.rbuf = ReadBuf self.wbuf = WriteBuf self.utf8rchar = b'\xef\xbf\xbd' def _b(cls, v): v = re.sub(r'\s', '', v) data =...
4
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_buffer.py
test_unread
assert
numeric_literal
27
import re import pytest from ssh_audit.readbuf import ReadBuf from ssh_audit.writebuf import WriteBuf class TestBuffer: def init(self, ssh_audit): self.rbuf = ReadBuf self.wbuf = WriteBuf self.utf8rchar = b'\xef\xbf\xbd' def _b(cls, v): v = re.sub(r'\s', '', v) data =...
0
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_buffer.py
test_bitlen
assert
numeric_literal
25
import re import pytest from ssh_audit.readbuf import ReadBuf from ssh_audit.writebuf import WriteBuf class TestBuffer: def init(self, ssh_audit): self.rbuf = ReadBuf self.wbuf = WriteBuf self.utf8rchar = b'\xef\xbf\xbd' def _b(cls, v): v = re.sub(r'\s', '', v) data =...
6
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_buffer.py
test_reset
assert
numeric_literal
24
import re import pytest from ssh_audit.readbuf import ReadBuf from ssh_audit.writebuf import WriteBuf class TestBuffer: def init(self, ssh_audit): self.rbuf = ReadBuf self.wbuf = WriteBuf self.utf8rchar = b'\xef\xbf\xbd' def _b(cls, v): v = re.sub(r'\s', '', v) data =...
8
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_buffer.py
test_string
assert
variable
30
import re import pytest from ssh_audit.readbuf import ReadBuf from ssh_audit.writebuf import WriteBuf class TestBuffer: def init(self, ssh_audit): self.rbuf = ReadBuf self.wbuf = WriteBuf self.utf8rchar = b'\xef\xbf\xbd' def _b(cls, v): v = re.sub(r'\s', '', v) data =...
v
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_buffer.py
test_list_nonutf8
assert
variable
24
import re import pytest from ssh_audit.readbuf import ReadBuf from ssh_audit.writebuf import WriteBuf class TestBuffer: def init(self, ssh_audit): self.rbuf = ReadBuf self.wbuf = WriteBuf self.utf8rchar = b'\xef\xbf\xbd' def _b(cls, v): v = re.sub(r'\s', '', v) data =...
dst
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_buffer.py
test_mpint2
assert
complex_expr
32
import re import pytest from ssh_audit.readbuf import ReadBuf from ssh_audit.writebuf import WriteBuf class TestBuffer: def init(self, ssh_audit): self.rbuf = ReadBuf self.wbuf = WriteBuf self.utf8rchar = b'\xef\xbf\xbd' def _b(cls, v): v = re.sub(r'\s', '', v) data =...
p[0]
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_buffer.py
test_mpint2
assert
complex_expr
33
import re import pytest from ssh_audit.readbuf import ReadBuf from ssh_audit.writebuf import WriteBuf class TestBuffer: def init(self, ssh_audit): self.rbuf = ReadBuf self.wbuf = WriteBuf self.utf8rchar = b'\xef\xbf\xbd' def _b(cls, v): v = re.sub(r'\s', '', v) data =...
-0x80
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_buffer.py
test_mpint2
assert
func_call
31
import re import pytest from ssh_audit.readbuf import ReadBuf from ssh_audit.writebuf import WriteBuf class TestBuffer: def init(self, ssh_audit): self.rbuf = ReadBuf self.wbuf = WriteBuf self.utf8rchar = b'\xef\xbf\xbd' def _b(cls, v): v = re.sub(r'\s', '', v) data =...
self._b(p[1])
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_build_struct.py
test_prevent_runtime_error_regression
assert
variable
42
import os import pytest from ssh_audit.outputbuffer import OutputBuffer from ssh_audit.ssh2_kex import SSH2_Kex from ssh_audit.ssh2_kexparty import SSH2_KexParty def kex(ssh_audit): kex_algs, key_algs = [], [] enc, mac, compression, languages = [], [], ['none'], [] cli = SSH2_KexParty(enc, mac, compressio...
rv
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_build_struct.py
test_prevent_runtime_error_regression
assert
complex_expr
39
import os import pytest from ssh_audit.outputbuffer import OutputBuffer from ssh_audit.ssh2_kex import SSH2_Kex from ssh_audit.ssh2_kexparty import SSH2_KexParty def kex(ssh_audit): kex_algs, key_algs = [], [] enc, mac, compression, languages = [], [], ['none'], [] cli = SSH2_KexParty(enc, mac, compressio...
9 * 2
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_errors.py
test_connection_unresolved
assert
numeric_literal
47
import socket import errno import pytest from ssh_audit.outputbuffer import OutputBuffer class TestErrors: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer self.audit = ssh_audit.audit def _conf(self): conf = self.Audi...
1
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_errors.py
test_connection_closed_after_header
assert
numeric_literal
50
import socket import errno import pytest from ssh_audit.outputbuffer import OutputBuffer class TestErrors: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer self.audit = ssh_audit.audit def _conf(self): conf = self.Audi...
3
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_errors.py
test_connection_closed_after_banner
assert
numeric_literal
48
import socket import errno import pytest from ssh_audit.outputbuffer import OutputBuffer class TestErrors: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer self.audit = ssh_audit.audit def _conf(self): conf = self.Audi...
2
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_errors.py
test_protocol_mismatch_by_conf
assert
numeric_literal
50
import socket import errno import pytest from ssh_audit.outputbuffer import OutputBuffer class TestErrors: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer self.audit = ssh_audit.audit def _conf(self): conf = self.Audi...
4
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_errors.py
_audit
assert
numeric_literal
32
import socket import errno import pytest from ssh_audit.outputbuffer import OutputBuffer class TestErrors: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer self.audit = ssh_audit.audit def _conf(self): conf = self.Audi...
0
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_errors.py
test_connection_unresolved
assert
complex_expr
48
import socket import errno import pytest from ssh_audit.outputbuffer import OutputBuffer class TestErrors: def init(self, ssh_audit): self.AuditConf = ssh_audit.AuditConf self.OutputBuffer = ssh_audit.OutputBuffer self.audit = ssh_audit.audit def _conf(self): conf = self.Audi...
lines[-1]
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_outputbuffer.py
test_outputbuffer_levels
assert
numeric_literal
11
import pytest class TestOutputBuffer: def init(self, ssh_audit): self.OutputBuffer = ssh_audit.OutputBuffer def test_outputbuffer_levels(self): out = self.OutputBuffer() assert out.get_level('info') ==
0
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_outputbuffer.py
test_outputbuffer_levels
assert
numeric_literal
13
import pytest class TestOutputBuffer: def init(self, ssh_audit): self.OutputBuffer = ssh_audit.OutputBuffer def test_outputbuffer_levels(self): out = self.OutputBuffer() assert out.get_level('info') == 0 assert out.get_level('good') == 0 assert out.get_level('warn') =...
1
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_outputbuffer.py
test_outputbuffer_levels
assert
numeric_literal
14
import pytest class TestOutputBuffer: def init(self, ssh_audit): self.OutputBuffer = ssh_audit.OutputBuffer def test_outputbuffer_levels(self): out = self.OutputBuffer() assert out.get_level('info') == 0 assert out.get_level('good') == 0 assert out.get_level('warn') ==...
2
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_outputbuffer.py
test_outputbuffer_level
assert
numeric_literal
20
import pytest class TestOutputBuffer: def init(self, ssh_audit): self.OutputBuffer = ssh_audit.OutputBuffer def test_outputbuffer_level(self, output_spy): out = self.OutputBuffer() # visible: all out.level = 'info' output_spy.begin() out.info('info color') ...
5
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_outputbuffer.py
test_outputbuffer_level
assert
numeric_literal
30
import pytest class TestOutputBuffer: def init(self, ssh_audit): self.OutputBuffer = ssh_audit.OutputBuffer def test_outputbuffer_level(self, output_spy): out = self.OutputBuffer() # visible: all out.level = 'info' output_spy.begin() out.info('info color') ...
3
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_outputbuffer.py
test_outputbuffer_batch
assert
numeric_literal
32
import pytest class TestOutputBuffer: def init(self, ssh_audit): self.OutputBuffer = ssh_audit.OutputBuffer def test_outputbuffer_batch(self, output_spy): out = self.OutputBuffer() # visible: all output_spy.begin() out.level = 'info' out.batch = False o...
4
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_outputbuffer.py
test_outputbuffer_no_lines
assert
collection
13
import pytest class TestOutputBuffer: def init(self, ssh_audit): self.OutputBuffer = ssh_audit.OutputBuffer def test_outputbuffer_no_lines(self, output_spy): output_spy.begin() obuf = self.OutputBuffer() obuf.write() assert output_spy.flush() ==
['']
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_outputbuffer.py
test_outputbuffer_defaults
assert
bool_literal
13
import pytest class TestOutputBuffer: def init(self, ssh_audit): self.OutputBuffer = ssh_audit.OutputBuffer def test_outputbuffer_defaults(self): obuf = self.OutputBuffer() # default: on assert obuf.batch is False assert obuf.use_colors is
True
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_outputbuffer.py
test_outputbuffer_defaults
assert
bool_literal
12
import pytest class TestOutputBuffer: def init(self, ssh_audit): self.OutputBuffer = ssh_audit.OutputBuffer def test_outputbuffer_defaults(self): obuf = self.OutputBuffer() # default: on assert obuf.batch is
False
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_outputbuffer.py
test_outputbuffer_defaults
assert
string_literal
14
import pytest class TestOutputBuffer: def init(self, ssh_audit): self.OutputBuffer = ssh_audit.OutputBuffer def test_outputbuffer_defaults(self): obuf = self.OutputBuffer() # default: on assert obuf.batch is False assert obuf.use_colors is True assert obuf.lev...
'info'
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_outputbuffer.py
test_outputbuffer_level_property
assert
string_literal
16
import pytest class TestOutputBuffer: def init(self, ssh_audit): self.OutputBuffer = ssh_audit.OutputBuffer def test_outputbuffer_level_property(self): out = self.OutputBuffer() out.level = 'info' assert out.level == 'info' out.level = 'good' assert out.level =...
'warn'
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_outputbuffer.py
test_outputbuffer_level_property
assert
string_literal
18
import pytest class TestOutputBuffer: def init(self, ssh_audit): self.OutputBuffer = ssh_audit.OutputBuffer def test_outputbuffer_level_property(self): out = self.OutputBuffer() out.level = 'info' assert out.level == 'info' out.level = 'good' assert out.level =...
'fail'
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_outputbuffer.py
test_outputbuffer_level_property
assert
string_literal
20
import pytest class TestOutputBuffer: def init(self, ssh_audit): self.OutputBuffer = ssh_audit.OutputBuffer def test_outputbuffer_level_property(self): out = self.OutputBuffer() out.level = 'info' assert out.level == 'info' out.level = 'good' assert out.level =...
'unknown'
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_policy.py
test_builtin_policy_consistency
assert
numeric_literal
133
import hashlib import pytest from datetime import date from ssh_audit.builtin_policies import BUILTIN_POLICIES from ssh_audit.outputbuffer import OutputBuffer from ssh_audit.policy import Policy from ssh_audit.ssh2_kex import SSH2_Kex from ssh_audit.writebuf import WriteBuf class TestPolicy: def init(self, ssh_a...
0
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_policy.py
test_policy_evaluate_failing_1
assert
numeric_literal
54
import hashlib import pytest from datetime import date from ssh_audit.builtin_policies import BUILTIN_POLICIES from ssh_audit.outputbuffer import OutputBuffer from ssh_audit.policy import Policy from ssh_audit.ssh2_kex import SSH2_Kex from ssh_audit.writebuf import WriteBuf class TestPolicy: def init(self, ssh_a...
1
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_policy.py
test_policy_evaluate_failing_7
assert
numeric_literal
53
import hashlib import pytest from datetime import date from ssh_audit.builtin_policies import BUILTIN_POLICIES from ssh_audit.outputbuffer import OutputBuffer from ssh_audit.policy import Policy from ssh_audit.ssh2_kex import SSH2_Kex from ssh_audit.writebuf import WriteBuf class TestPolicy: def init(self, ssh_a...
2
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor
jtesta/ssh-audit
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
train
train
test/test_policy.py
test_policy_evaluate_subset_failing_1
assert
numeric_literal
53
import hashlib import pytest from datetime import date from ssh_audit.builtin_policies import BUILTIN_POLICIES from ssh_audit.outputbuffer import OutputBuffer from ssh_audit.policy import Policy from ssh_audit.ssh2_kex import SSH2_Kex from ssh_audit.writebuf import WriteBuf class TestPolicy: def init(self, ssh_a...
4
3c31934ac7b5ab816bb31640cd34f57b1c2f9b00
49
v2_extractor_at_anchor