repo_id string | cross_repo_split string | commit_index int32 | commit_sha string | in_repo_split string | test_file string | file_split string | split_group string | lineno int32 | col_offset int32 | assertion_type string | test_function string | prefix large_string | target string | assertion_event_type string | assertion_event_id string | assertion_anchor large_string | old_target string | old_lineno int32 | old_col_offset int32 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
xflr6/graphviz | train | 234 | dd06dfeac957f227736a5fd1155c0e77b2e929fb | train | tests/test_sources.py | train | xflr6/graphviz:tests/test_sources.py | 86 | 4 | assert | test_source_iter | import locale
import pytest
import graphviz
SOURCE = {'source': 'digraph { hello -> world }\n',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'}
@pytest.fixture(scope='module')
def source():
return graphviz.Source(**SOURCE)
@pyte... | list(source) * 2 | added | 539ef27973323d061249c0cdccc89c1d589e583dcb444baf1fe7cfd38d7ca228 | assert|test_source_iter|import locale import pytest import graphviz SOURCE = {'source': 'digraph { hello -> world }\n', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'} @pytest.fixture(scope='module') def source(): return graphviz.Source(**SOURCE) @pytest.mark... | null | null | null |
xflr6/graphviz | train | 235 | d28e7d977dc027888762dc95205fcf4b42089107 | train | tests/test_all_classes.py | train | xflr6/graphviz:tests/test_all_classes.py | 167 | 4 | assert | test_pipe_lines_mocked | import locale
import re
import pytest
import graphviz
ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source]
@pytest.fixture(params=ALL_CLASSES)
def cls(request):
return request.param
@pytest.fixture
def dot(cls):
if cls.__name__ == 'Source':
return cls('digraph { hello -> world }\n')... | mock_pipe_lines.return_value | modified | 2b28e4f6ab49788117075e347d722386ec1124652b9327d4542d34763962ff42 | assert|test_pipe_lines_mocked|import locale import re import pytest import graphviz ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source] @pytest.fixture(params=ALL_CLASSES) def cls(request): return request.param @pytest.fixture def dot(cls): if cls.__name__ == 'Source': return cls('digraph { hello -> world... | mock_pipe_lines.return_value | 165 | 4 |
xflr6/graphviz | train | 235 | d28e7d977dc027888762dc95205fcf4b42089107 | train | tests/test_all_classes.py | train | xflr6/graphviz:tests/test_all_classes.py | 218 | 4 | assert_* | test_unflatten_mocked | import locale
import re
import pytest
import graphviz
ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source]
@pytest.fixture(params=ALL_CLASSES)
def cls(request):
return request.param
@pytest.fixture
def dot(cls):
if cls.__name__ == 'Source':
return cls('digraph { hello -> world }\n')... | dot.source) | added | 2dc2b83cc36e27b179603f8b1733de5c135e78c8d1f762f66ca8920075897212 | assert_*|test_unflatten_mocked|import locale import re import pytest import graphviz ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source] @pytest.fixture(params=ALL_CLASSES) def cls(request): return request.param @pytest.fixture def dot(cls): if cls.__name__ == 'Source': return cls('digraph { hello -> worl... | null | null | null |
xflr6/graphviz | train | 235 | d28e7d977dc027888762dc95205fcf4b42089107 | train | tests/test_all_classes.py | train | xflr6/graphviz:tests/test_all_classes.py | 228 | 4 | assert | test_view_mocked | import locale
import re
import pytest
import graphviz
ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source]
@pytest.fixture(params=ALL_CLASSES)
def cls(request):
return request.param
@pytest.fixture
def dot(cls):
if cls.__name__ == 'Source':
return cls('digraph { hello -> world }\n')... | mock_render.return_value | added | 6cf9077b5e00b6d0616822f2fae4f35b5117b82f72bb54c448e26640e1c53558 | assert|test_view_mocked|import locale import re import pytest import graphviz ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source] @pytest.fixture(params=ALL_CLASSES) def cls(request): return request.param @pytest.fixture def dot(cls): if cls.__name__ == 'Source': return cls('digraph { hello -> world }\n')... | null | null | null |
xflr6/graphviz | train | 235 | d28e7d977dc027888762dc95205fcf4b42089107 | train | tests/test_all_classes.py | train | xflr6/graphviz:tests/test_all_classes.py | 246 | 4 | assert_* | test__view_mocked | import locale
import re
import pytest
import graphviz
ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source]
@pytest.fixture(params=ALL_CLASSES)
def cls(request):
return request.param
@pytest.fixture
def dot(cls):
if cls.__name__ == 'Source':
return cls('digraph { hello -> world }\n')... | sentinel.name) | added | 825070044bf019106b32154a9b0ef21186bf9e7175a7bc8a6d4bb646e9134970 | assert_*|test__view_mocked|import locale import re import pytest import graphviz ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source] @pytest.fixture(params=ALL_CLASSES) def cls(request): return request.param @pytest.fixture def dot(cls): if cls.__name__ == 'Source': return cls('digraph { hello -> world }\... | null | null | null |
xflr6/graphviz | train | 236 | 2674316e02db0cb0d8d1607589c3d43913cf9515 | train | tests/test_all_classes.py | train | xflr6/graphviz:tests/test_all_classes.py | 173 | 8 | assert | test_pipe_mocked | import locale
import re
import pytest
import graphviz
ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source]
@pytest.fixture(params=ALL_CLASSES)
def cls(request):
return request.param
@pytest.fixture
def dot(cls):
if cls.__name__ == 'Source':
return cls('digraph { hello -> world }\n')... | mock_pipe_lines.return_value.decode.return_value | added | 89e45a190e61729da5d4c33dde383def9b36fbc2dc8d6f08b01fc95067c29add | assert|test_pipe_mocked|import locale import re import pytest import graphviz ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source] @pytest.fixture(params=ALL_CLASSES) def cls(request): return request.param @pytest.fixture def dot(cls): if cls.__name__ == 'Source': return cls('digraph { hello -> world }\n')... | null | null | null |
xflr6/graphviz | train | 236 | 2674316e02db0cb0d8d1607589c3d43913cf9515 | train | tests/test_all_classes.py | train | xflr6/graphviz:tests/test_all_classes.py | 185 | 4 | assert_* | test_pipe_lines_mocked | import locale
import re
import pytest
import graphviz
ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source]
@pytest.fixture(params=ALL_CLASSES)
def cls(request):
return request.param
@pytest.fixture
def dot(cls):
if cls.__name__ == 'Source':
return cls('digraph { hello -> world }\n')... | mocker.ANY) | added | 9df1f0b25ccdb35fd3d46ab9e107adf0528c7e51444c6972e7a7047bd84acd81 | assert_*|test_pipe_lines_mocked|import locale import re import pytest import graphviz ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source] @pytest.fixture(params=ALL_CLASSES) def cls(request): return request.param @pytest.fixture def dot(cls): if cls.__name__ == 'Source': return cls('digraph { hello -> wor... | null | null | null |
xflr6/graphviz | train | 236 | 2674316e02db0cb0d8d1607589c3d43913cf9515 | train | tests/test_all_classes.py | train | xflr6/graphviz:tests/test_all_classes.py | 229 | 4 | assert | test_unflatten_mocked | import locale
import re
import pytest
import graphviz
ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source]
@pytest.fixture(params=ALL_CLASSES)
def cls(request):
return request.param
@pytest.fixture
def dot(cls):
if cls.__name__ == 'Source':
return cls('digraph { hello -> world }\n')... | dot.renderer | added | 43e88b3c0ec4915c9123becacdeb9cf774e5182a27c75271a566d81c4bf3290c | assert|test_unflatten_mocked|import locale import re import pytest import graphviz ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source] @pytest.fixture(params=ALL_CLASSES) def cls(request): return request.param @pytest.fixture def dot(cls): if cls.__name__ == 'Source': return cls('digraph { hello -> world ... | null | null | null |
xflr6/graphviz | train | 236 | 2674316e02db0cb0d8d1607589c3d43913cf9515 | train | tests/test_all_classes.py | train | xflr6/graphviz:tests/test_all_classes.py | 244 | 4 | assert | test_view_mocked | import locale
import re
import pytest
import graphviz
ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source]
@pytest.fixture(params=ALL_CLASSES)
def cls(request):
return request.param
@pytest.fixture
def dot(cls):
if cls.__name__ == 'Source':
return cls('digraph { hello -> world }\n')... | mock_render.return_value | added | 1069a69a7e0078d533a908caff5479ad43083e60b4efe87c35406132ae4f3714 | assert|test_view_mocked|import locale import re import pytest import graphviz ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source] @pytest.fixture(params=ALL_CLASSES) def cls(request): return request.param @pytest.fixture def dot(cls): if cls.__name__ == 'Source': return cls('digraph { hello -> world }\n')... | null | null | null |
xflr6/graphviz | train | 236 | 2674316e02db0cb0d8d1607589c3d43913cf9515 | train | tests/test_sources.py | train | xflr6/graphviz:tests/test_sources.py | 61 | 4 | assert | test_from_file | import locale
import pytest
import graphviz
SOURCE = {'source': 'digraph { hello -> world }\n',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'}
@pytest.fixture(scope='module')
def source():
return graphviz.Source(**SOURCE)
@pyte... | filename | added | d25984ec7177820db759bd868931191f0a40a6c3ac38a2dace49b0d2733633f5 | assert|test_from_file|import locale import pytest import graphviz SOURCE = {'source': 'digraph { hello -> world }\n', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'} @pytest.fixture(scope='module') def source(): return graphviz.Source(**SOURCE) @pytest.mark.p... | null | null | null |
xflr6/graphviz | train | 236 | 2674316e02db0cb0d8d1607589c3d43913cf9515 | train | tests/test_sources.py | train | xflr6/graphviz:tests/test_sources.py | 63 | 4 | assert | test_from_file | import locale
import pytest
import graphviz
SOURCE = {'source': 'digraph { hello -> world }\n',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'}
@pytest.fixture(scope='module')
def source():
return graphviz.Source(**SOURCE)
@pyte... | encoding | added | 8be4cfe3bb90cbab03760fbf13e86988d6af9d42b5e62b50a462cb06dbe93392 | assert|test_from_file|import locale import pytest import graphviz SOURCE = {'source': 'digraph { hello -> world }\n', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'} @pytest.fixture(scope='module') def source(): return graphviz.Source(**SOURCE) @pytest.mark.p... | null | null | null |
xflr6/graphviz | train | 236 | 2674316e02db0cb0d8d1607589c3d43913cf9515 | train | tests/test_sources.py | train | xflr6/graphviz:tests/test_sources.py | 64 | 4 | assert | test_from_file | import locale
import pytest
import graphviz
SOURCE = {'source': 'digraph { hello -> world }\n',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'}
@pytest.fixture(scope='module')
def source():
return graphviz.Source(**SOURCE)
@pyte... | renderer | added | 7f4343eef3d9262595c9f9130252fd7a7c6cbf1c2a54a7d4582585e15ae5d168 | assert|test_from_file|import locale import pytest import graphviz SOURCE = {'source': 'digraph { hello -> world }\n', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'} @pytest.fixture(scope='module') def source(): return graphviz.Source(**SOURCE) @pytest.mark.p... | null | null | null |
xflr6/graphviz | train | 236 | 2674316e02db0cb0d8d1607589c3d43913cf9515 | train | tests/test_sources.py | train | xflr6/graphviz:tests/test_sources.py | 72 | 4 | assert | test_source_iter | import locale
import pytest
import graphviz
SOURCE = {'source': 'digraph { hello -> world }\n',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'}
@pytest.fixture(scope='module')
def source():
return graphviz.Source(**SOURCE)
@pyte... | list(source) * 2 | added | e32639c8d28c1262f4833bcb8971e347889e1fe8c2202046235811769221eb0d | assert|test_source_iter|import locale import pytest import graphviz SOURCE = {'source': 'digraph { hello -> world }\n', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'} @pytest.fixture(scope='module') def source(): return graphviz.Source(**SOURCE) @pytest.mark... | null | null | null |
xflr6/graphviz | train | 237 | 967f7e708f6c3723849500c0b08094a8086ff92d | train | try-examples.py | train | xflr6/graphviz:try-examples.py | 38 | 12 | assert | #!/usr/bin/env python3
# flake8: noqa
"""Import ``graphviz`` here and run all scripts in the ``examples/`` dir."""
import os
import pathlib
import sys
import unittest.mock
import warnings
import graphviz # noqa: F401
EXAMPLES = pathlib.Path('examples')
IO_KWARGS = {'encoding': 'utf-8'}
DEFAULT_FORMAT = 'pdf'
o... | pathlib.Path(rendered).stat().st_size | added | 8434bf4b6da2391a720a6b0f044ffdef109ac9ec146798cffd5e578c9b540dda | assert||#!/usr/bin/env python3 # flake8: noqa """Import ``graphviz`` here and run all scripts in the ``examples/`` dir.""" import os import pathlib import sys import unittest.mock import warnings import graphviz # noqa: F401 EXAMPLES = pathlib.Path('examples') IO_KWARGS = {'encoding': 'utf-8'} DEFAULT_FORMAT = 'pdf' os... | null | null | null | |
xflr6/graphviz | train | 238 | e633665e5631d0b451e33c3353f31c7afa0d378e | train | tests/test_graphs.py | train | xflr6/graphviz:tests/test_graphs.py | 57 | 4 | assert | test_clear | import itertools
import pytest
import graphviz
BASE_GRAPHS = [graphviz.Graph, graphviz.Digraph]
@pytest.fixture(params=BASE_GRAPHS)
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations(BASE_GRAPHS, 2)),
ids=lambda c: f'{c[0].__name__}, {c[1].__name__}')
de... | all(getattr(c, k) == v for k, v in kwargs.items()) | added | 9f22a141855c320561fbee77b1ae5c0351580bc0322f9ac68dec4064539a898c | assert|test_clear|import itertools import pytest import graphviz BASE_GRAPHS = [graphviz.Graph, graphviz.Digraph] @pytest.fixture(params=BASE_GRAPHS) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations(BASE_GRAPHS, 2)), ids=lambda c: f'{c[0].__name__}, {c[1].__name__}') def classes... | null | null | null |
xflr6/graphviz | train | 238 | e633665e5631d0b451e33c3353f31c7afa0d378e | train | tests/test_graphs.py | train | xflr6/graphviz:tests/test_graphs.py | 86 | 9 | pytest.raises | test_attr_invalid_kw | import itertools
import pytest
import graphviz
BASE_GRAPHS = [graphviz.Graph, graphviz.Digraph]
@pytest.fixture(params=BASE_GRAPHS)
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations(BASE_GRAPHS, 2)),
ids=lambda c: f'{c[0].__name__}, {c[1].__name__}')
de... | ValueError, match=r'attr') | added | 7c946ee3fefda0c64c9bf7bca866f91e4de7d6e41674b21ecb4007cc573a2400 | pytest.raises|test_attr_invalid_kw|import itertools import pytest import graphviz BASE_GRAPHS = [graphviz.Graph, graphviz.Digraph] @pytest.fixture(params=BASE_GRAPHS) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations(BASE_GRAPHS, 2)), ids=lambda c: f'{c[0].__name__}, {c[1].__name... | null | null | null |
xflr6/graphviz | train | 238 | e633665e5631d0b451e33c3353f31c7afa0d378e | train | tests/test_graphs.py | train | xflr6/graphviz:tests/test_graphs.py | 98 | 4 | assert | test_attr_kw_none | import itertools
import pytest
import graphviz
BASE_GRAPHS = [graphviz.Graph, graphviz.Digraph]
@pytest.fixture(params=BASE_GRAPHS)
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations(BASE_GRAPHS, 2)),
ids=lambda c: f'{c[0].__name__}, {c[1].__name__}')
de... | expected | added | d689310c760464606475b8ce2ef88f2fc6862756415a4501ae889432212c6db0 | assert|test_attr_kw_none|import itertools import pytest import graphviz BASE_GRAPHS = [graphviz.Graph, graphviz.Digraph] @pytest.fixture(params=BASE_GRAPHS) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations(BASE_GRAPHS, 2)), ids=lambda c: f'{c[0].__name__}, {c[1].__name__}') def ... | null | null | null |
xflr6/graphviz | train | 238 | e633665e5631d0b451e33c3353f31c7afa0d378e | train | tests/test_graphs.py | train | xflr6/graphviz:tests/test_graphs.py | 136 | 9 | pytest.raises | test_subgraph_graph_notsole | import itertools
import pytest
import graphviz
BASE_GRAPHS = [graphviz.Graph, graphviz.Digraph]
@pytest.fixture(params=BASE_GRAPHS)
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations(BASE_GRAPHS, 2)),
ids=lambda c: f'{c[0].__name__}, {c[1].__name__}')
de... | ValueError, match=r'sole') | added | 0c72b60920c7c928f7c0696a2fd89b727e73f2700f422751830dc110dad1716a | pytest.raises|test_subgraph_graph_notsole|import itertools import pytest import graphviz BASE_GRAPHS = [graphviz.Graph, graphviz.Digraph] @pytest.fixture(params=BASE_GRAPHS) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations(BASE_GRAPHS, 2)), ids=lambda c: f'{c[0].__name__}, {c[1]... | null | null | null |
xflr6/graphviz | train | 238 | e633665e5631d0b451e33c3353f31c7afa0d378e | train | tests/test_sources.py | train | xflr6/graphviz:tests/test_sources.py | 33 | 4 | assert | test_init_filename | import locale
import pytest
import graphviz
SOURCE = {'source': 'digraph { hello -> world }\n',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'}
@pytest.fixture(scope='module')
def source():
return graphviz.Source(**SOURCE)
@pyte... | 'Subcls.gv' | modified | 51d2f2278f3a5e1d421e838681430db88b50282c9485e5ad36ccedcebedff852 | assert|test_init_filename|import locale import pytest import graphviz SOURCE = {'source': 'digraph { hello -> world }\n', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'} @pytest.fixture(scope='module') def source(): return graphviz.Source(**SOURCE) @pytest.ma... | 'name.gv' | 33 | 4 |
xflr6/graphviz | train | 238 | e633665e5631d0b451e33c3353f31c7afa0d378e | train | tests/test_sources.py | train | xflr6/graphviz:tests/test_sources.py | 41 | 8 | assert | test_filepath | import locale
import pytest
import graphviz
SOURCE = {'source': 'digraph { hello -> world }\n',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'}
@pytest.fixture(scope='module')
def source():
return graphviz.Source(**SOURCE)
@pyte... | 'test-output/hello.gv' | modified | ade491d50ff986579289eb5c5cafb8093984e557ad01b90afc721688eee2647b | assert|test_filepath|import locale import pytest import graphviz SOURCE = {'source': 'digraph { hello -> world }\n', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'} @pytest.fixture(scope='module') def source(): return graphviz.Source(**SOURCE) @pytest.mark.pa... | 'test-output/hello.gv' | 41 | 8 |
xflr6/graphviz | train | 238 | e633665e5631d0b451e33c3353f31c7afa0d378e | train | tests/test_sources.py | train | xflr6/graphviz:tests/test_sources.py | 61 | 4 | assert | test_from_file | import locale
import pytest
import graphviz
SOURCE = {'source': 'digraph { hello -> world }\n',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'}
@pytest.fixture(scope='module')
def source():
return graphviz.Source(**SOURCE)
@pyte... | filename | modified | 903cadfabdf22aab0410f1520f77c9e080da6627eb56a3a610caf32d257320e4 | assert|test_from_file|import locale import pytest import graphviz SOURCE = {'source': 'digraph { hello -> world }\n', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'} @pytest.fixture(scope='module') def source(): return graphviz.Source(**SOURCE) @pytest.mark.p... | filename | 61 | 4 |
xflr6/graphviz | train | 238 | e633665e5631d0b451e33c3353f31c7afa0d378e | train | tests/test_sources.py | train | xflr6/graphviz:tests/test_sources.py | 72 | 4 | assert | test_source_iter | import locale
import pytest
import graphviz
SOURCE = {'source': 'digraph { hello -> world }\n',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'}
@pytest.fixture(scope='module')
def source():
return graphviz.Source(**SOURCE)
@pyte... | list(source) * 2 | modified | 90d9a1f6d3a62b436a0f9a2b8c0225a3e48ea85ac24cb11cd952890edf97ab02 | assert|test_source_iter|import locale import pytest import graphviz SOURCE = {'source': 'digraph { hello -> world }\n', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8'} @pytest.fixture(scope='module') def source(): return graphviz.Source(**SOURCE) @pytest.mark... | list(source) * 2 | 72 | 4 |
xflr6/graphviz | train | 239 | b174a3d55d235e575e0bcdf20434244e31d67deb | train | tests/test_all_classes.py | train | xflr6/graphviz:tests/test_all_classes.py | 215 | 4 | assert | test_repr_jpeg_mocked | import locale
import re
import pytest
import graphviz
ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source]
@pytest.fixture(params=ALL_CLASSES)
def cls(request):
return request.param
@pytest.fixture
def dot(cls):
if cls.__name__ == 'Source':
return cls('digraph { hello -> world }\n')... | { 'image/jpeg': mock_pipe.return_value} | added | b9ffff6dbdd5c312ff324963f91090481a3862f9cb06701d34dcd7f6dcaa943f | assert|test_repr_jpeg_mocked|import locale import re import pytest import graphviz ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source] @pytest.fixture(params=ALL_CLASSES) def cls(request): return request.param @pytest.fixture def dot(cls): if cls.__name__ == 'Source': return cls('digraph { hello -> world ... | null | null | null |
xflr6/graphviz | train | 239 | b174a3d55d235e575e0bcdf20434244e31d67deb | train | tests/test_all_classes.py | train | xflr6/graphviz:tests/test_all_classes.py | 230 | 8 | assert | test_unflatten | import locale
import re
import pytest
import graphviz
ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source]
@pytest.fixture(params=ALL_CLASSES)
def cls(request):
return request.param
@pytest.fixture
def dot(cls):
if cls.__name__ == 'Source':
return cls('digraph { hello -> world }\n')... | normalized.startswith('digraph {' if dot.directed else 'graph {') | added | d3aeff769bc043d366dd262d6277e7416085a0a45dd187465e1073ae47c4844b | assert|test_unflatten|import locale import re import pytest import graphviz ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source] @pytest.fixture(params=ALL_CLASSES) def cls(request): return request.param @pytest.fixture def dot(cls): if cls.__name__ == 'Source': return cls('digraph { hello -> world }\n') r... | null | null | null |
xflr6/graphviz | train | 239 | b174a3d55d235e575e0bcdf20434244e31d67deb | train | tests/test_all_classes.py | train | xflr6/graphviz:tests/test_all_classes.py | 244 | 4 | assert | test_unflatten_mocked | import locale
import re
import pytest
import graphviz
ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source]
@pytest.fixture(params=ALL_CLASSES)
def cls(request):
return request.param
@pytest.fixture
def dot(cls):
if cls.__name__ == 'Source':
return cls('digraph { hello -> world }\n')... | dot.filename | added | ed6b10f67fc8a9292b70012ef4e9fa06482e93bdf480d1745fa41a5a8ae0579c | assert|test_unflatten_mocked|import locale import re import pytest import graphviz ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source] @pytest.fixture(params=ALL_CLASSES) def cls(request): return request.param @pytest.fixture def dot(cls): if cls.__name__ == 'Source': return cls('digraph { hello -> world ... | null | null | null |
xflr6/graphviz | train | 239 | b174a3d55d235e575e0bcdf20434244e31d67deb | train | tests/test_init.py | train | xflr6/graphviz:tests/test_init.py | 18 | 9 | pytest.raises | test_set_default_format_invalid | import pytest
import graphviz
DEFAULT_ENGINE = 'dot'
DEFAULT_FORMAT = 'pdf'
DEFAULT_JUPYTER_REPRESENTATION = 'image/svg+xml'
def test_set_default_engine_invalid():
with pytest.raises(ValueError, match=r'unknown engine'):
graphviz.set_default_engine('nonengine')
def test_set_default_format_invalid():... | ValueError, match=r'unknown format') | modified | 33cc96b50c39d6d603a75e38cabf491a986cfcef38875393ab16bf443867d84d | pytest.raises|test_set_default_format_invalid|import pytest import graphviz DEFAULT_ENGINE = 'dot' DEFAULT_FORMAT = 'pdf' DEFAULT_JUPYTER_REPRESENTATION = 'image/svg+xml' def test_set_default_engine_invalid(): with pytest.raises(ValueError, match=r'unknown engine'): graphviz.set_default_engine('nonengine') def test_set... | ValueError, match=r'unknown format') | 16 | 9 |
xflr6/graphviz | train | 239 | b174a3d55d235e575e0bcdf20434244e31d67deb | train | tests/test_init.py | train | xflr6/graphviz:tests/test_init.py | 91 | 4 | assert | test_set_default_format | import pytest
import graphviz
DEFAULT_ENGINE = 'dot'
DEFAULT_FORMAT = 'pdf'
DEFAULT_JUPYTER_REPRESENTATION = 'image/svg+xml'
def test_set_default_engine_invalid():
with pytest.raises(ValueError, match=r'unknown engine'):
graphviz.set_default_engine('nonengine')
def test_set_default_format_invalid():... | format | modified | 08d3c84cc8036dc10ca25230a41a2033715155e80e68c23952eaa902b4d6353c | assert|test_set_default_format|import pytest import graphviz DEFAULT_ENGINE = 'dot' DEFAULT_FORMAT = 'pdf' DEFAULT_JUPYTER_REPRESENTATION = 'image/svg+xml' def test_set_default_engine_invalid(): with pytest.raises(ValueError, match=r'unknown engine'): graphviz.set_default_engine('nonengine') def test_set_default_format... | DEFAULT_FORMAT | 88 | 4 |
xflr6/graphviz | train | 239 | b174a3d55d235e575e0bcdf20434244e31d67deb | train | tests/test_init.py | train | xflr6/graphviz:tests/test_init.py | 119 | 4 | assert | test_set_default_jupyter_representation | import pytest
import graphviz
DEFAULT_ENGINE = 'dot'
DEFAULT_FORMAT = 'pdf'
DEFAULT_JUPYTER_REPRESENTATION = 'image/svg+xml'
def test_set_default_engine_invalid():
with pytest.raises(ValueError, match=r'unknown engine'):
graphviz.set_default_engine('nonengine')
def test_set_default_format_invalid():... | DEFAULT_JUPYTER_REPRESENTATION | added | 685eb4c6ff1e8d6f05479e3282280044f904a7c3229d1848fceb9e6f15f741bb | assert|test_set_default_jupyter_representation|import pytest import graphviz DEFAULT_ENGINE = 'dot' DEFAULT_FORMAT = 'pdf' DEFAULT_JUPYTER_REPRESENTATION = 'image/svg+xml' def test_set_default_engine_invalid(): with pytest.raises(ValueError, match=r'unknown engine'): graphviz.set_default_engine('nonengine') def test_se... | null | null | null |
xflr6/graphviz | train | 239 | b174a3d55d235e575e0bcdf20434244e31d67deb | train | tests/test_parameters.py | test | xflr6/graphviz:tests/test_parameters.py | 46 | 9 | pytest.raises | test_verify_parameter_raises_unknown | import pytest
import graphviz
from graphviz import parameters
from graphviz import jupyter_integration
VERIFY_FUNCS = [parameters.verify_engine,
parameters.verify_format,
parameters.verify_renderer,
parameters.verify_formatter,
jupyter_integration.verify... | ValueError, match=r'unknown') | modified | 02a815d0deada003d11d6842ffe9a87f93a60025cc1ace468abe793d08f43051 | pytest.raises|test_verify_parameter_raises_unknown|import pytest import graphviz from graphviz import parameters from graphviz import jupyter_integration VERIFY_FUNCS = [parameters.verify_engine, parameters.verify_format, parameters.verify_renderer, parameters.verify_formatter, jupyter_integration.verify_jupyter_repres... | ValueError, match=r'unknown') | 44 | 9 |
xflr6/graphviz | train | 239 | b174a3d55d235e575e0bcdf20434244e31d67deb | train | tests/test_parameters.py | test | xflr6/graphviz:tests/test_parameters.py | 53 | 4 | assert | test_verify_parameter_none_required_false_passes | import pytest
import graphviz
from graphviz import parameters
from graphviz import jupyter_integration
VERIFY_FUNCS = [parameters.verify_engine,
parameters.verify_format,
parameters.verify_renderer,
parameters.verify_formatter,
jupyter_integration.verify... | None | modified | 141ac1f9785caefc800681433baa6a183398e6d47fde7d42bd9592aaaeb180b3 | assert|test_verify_parameter_none_required_false_passes|import pytest import graphviz from graphviz import parameters from graphviz import jupyter_integration VERIFY_FUNCS = [parameters.verify_engine, parameters.verify_format, parameters.verify_renderer, parameters.verify_formatter, jupyter_integration.verify_jupyter_r... | None | 51 | 4 |
xflr6/graphviz | train | 240 | acf79bca4518781cad02c102e89ec4e9ce757088 | train | tests/test_all_classes.py | train | xflr6/graphviz:tests/test_all_classes.py | 197 | 4 | assert | test_repr_mimebundle_image_svg_xml_mocked | import locale
import re
import pytest
import graphviz
ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source]
@pytest.fixture(params=ALL_CLASSES)
def cls(request):
return request.param
@pytest.fixture
def dot(cls):
if cls.__name__ == 'Source':
return cls('digraph { hello -> world }\n')... | {'image/svg+xml': mock_pipe.return_value} | added | 27d107c831b43ee13e15ad3d78a240300c0daef6a398a53fb0d6738ea1f68d5b | assert|test_repr_mimebundle_image_svg_xml_mocked|import locale import re import pytest import graphviz ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source] @pytest.fixture(params=ALL_CLASSES) def cls(request): return request.param @pytest.fixture def dot(cls): if cls.__name__ == 'Source': return cls('digra... | null | null | null |
xflr6/graphviz | train | 240 | acf79bca4518781cad02c102e89ec4e9ce757088 | train | tests/test_all_classes.py | train | xflr6/graphviz:tests/test_all_classes.py | 205 | 4 | assert | test_repr_mimebundle_image_png_mocked | import locale
import re
import pytest
import graphviz
ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source]
@pytest.fixture(params=ALL_CLASSES)
def cls(request):
return request.param
@pytest.fixture
def dot(cls):
if cls.__name__ == 'Source':
return cls('digraph { hello -> world }\n')... | {'image/png': mock_pipe.return_value} | added | 60f49c47801abf531530707c0f6508942376f751606900d35c0f9d461a07ef36 | assert|test_repr_mimebundle_image_png_mocked|import locale import re import pytest import graphviz ALL_CLASSES = [graphviz.Graph, graphviz.Digraph, graphviz.Source] @pytest.fixture(params=ALL_CLASSES) def cls(request): return request.param @pytest.fixture def dot(cls): if cls.__name__ == 'Source': return cls('digraph {... | null | null | null |
xflr6/graphviz | train | 240 | acf79bca4518781cad02c102e89ec4e9ce757088 | train | tests/test_init.py | train | xflr6/graphviz:tests/test_init.py | 20 | 9 | pytest.raises | test_set_default_format_invalid | import pytest
import graphviz
DEFAULT_ENGINE = 'dot'
DEFAULT_FORMAT = 'pdf'
DEFAULT_JUPYTER_FORMAT = 'svg'
DEFAULT_JUPYTER_MIMETYPE = 'image/svg+xml'
def test_set_default_engine_invalid():
with pytest.raises(ValueError, match=r'unknown engine'):
graphviz.set_default_engine('nonengine')
def test_set... | ValueError, match=r'unknown format') | modified | b75a9c5cbe3206947e04477cdafaf96833542bfea1eef7ef101c2e61d7808e16 | pytest.raises|test_set_default_format_invalid|import pytest import graphviz DEFAULT_ENGINE = 'dot' DEFAULT_FORMAT = 'pdf' DEFAULT_JUPYTER_FORMAT = 'svg' DEFAULT_JUPYTER_MIMETYPE = 'image/svg+xml' def test_set_default_engine_invalid(): with pytest.raises(ValueError, match=r'unknown engine'): graphviz.set_default_engine(... | ValueError, match=r'unknown format') | 18 | 9 |
xflr6/graphviz | train | 240 | acf79bca4518781cad02c102e89ec4e9ce757088 | train | tests/test_init.py | train | xflr6/graphviz:tests/test_init.py | 35 | 4 | assert | test_set_default_engine | import pytest
import graphviz
DEFAULT_ENGINE = 'dot'
DEFAULT_FORMAT = 'pdf'
DEFAULT_JUPYTER_FORMAT = 'svg'
DEFAULT_JUPYTER_MIMETYPE = 'image/svg+xml'
def test_set_default_engine_invalid():
with pytest.raises(ValueError, match=r'unknown engine'):
graphviz.set_default_engine('nonengine')
def test_set... | DEFAULT_ENGINE | added | 2a5a4b62d13bcfaa406485382b80015bd3cfc9fff0e82a19ad6881d0f7d805d2 | assert|test_set_default_engine|import pytest import graphviz DEFAULT_ENGINE = 'dot' DEFAULT_FORMAT = 'pdf' DEFAULT_JUPYTER_FORMAT = 'svg' DEFAULT_JUPYTER_MIMETYPE = 'image/svg+xml' def test_set_default_engine_invalid(): with pytest.raises(ValueError, match=r'unknown engine'): graphviz.set_default_engine('nonengine') de... | null | null | null |
xflr6/graphviz | train | 240 | acf79bca4518781cad02c102e89ec4e9ce757088 | train | tests/test_jupyter_integration.py | train | xflr6/graphviz:tests/test_jupyter_integration.py | 7 | 9 | pytest.raises | test_get_jupyter_format_mimetype_invalid_raises_unknown | import pytest
from graphviz import jupyter_integration
def test_get_jupyter_format_mimetype_invalid_raises_unknown():
with pytest.raises( | ValueError, match=r'unknown') | added | 9cd69c32b995242866db3c9b4f3b88d1fdd4cef6523c941f2c9f985160eeff59 | pytest.raises|test_get_jupyter_format_mimetype_invalid_raises_unknown|import pytest from graphviz import jupyter_integration def test_get_jupyter_format_mimetype_invalid_raises_unknown(): with pytest.raises( | null | null | null |
xflr6/graphviz | train | 240 | acf79bca4518781cad02c102e89ec4e9ce757088 | train | tests/test_jupyter_integration.py | train | xflr6/graphviz:tests/test_jupyter_integration.py | 12 | 4 | assert | test_get_jupyter_mimetype_format_normalizes | import pytest
from graphviz import jupyter_integration
def test_get_jupyter_format_mimetype_invalid_raises_unknown():
with pytest.raises(ValueError, match=r'unknown'):
jupyter_integration.get_jupyter_format_mimetype('Brian!')
def test_get_jupyter_mimetype_format_normalizes():
assert jupyter_integra... | 'jpeg' | added | 385fa4b8f00fdcb79b382f86b4a836c2727fc211311b00657a112b11b52bedf3 | assert|test_get_jupyter_mimetype_format_normalizes|import pytest from graphviz import jupyter_integration def test_get_jupyter_format_mimetype_invalid_raises_unknown(): with pytest.raises(ValueError, match=r'unknown'): jupyter_integration.get_jupyter_format_mimetype('Brian!') def test_get_jupyter_mimetype_format_normal... | null | null | null |
xflr6/graphviz | train | 240 | acf79bca4518781cad02c102e89ec4e9ce757088 | train | tests/test_parameters.py | test | xflr6/graphviz:tests/test_parameters.py | 36 | 4 | assert | test_parameters | import pytest
import graphviz
from graphviz import parameters
VERIFY_FUNCS = [parameters.verify_engine,
parameters.verify_format,
parameters.verify_renderer,
parameters.verify_formatter]
@pytest.mark.parametrize(
'cls', [graphviz.Graph, graphviz.Digraph, graphviz.... | format | modified | eb80abde011a2ecab7f29da95d73f34e1fcbf7502d5630225b394a4b06253276 | assert|test_parameters|import pytest import graphviz from graphviz import parameters VERIFY_FUNCS = [parameters.verify_engine, parameters.verify_format, parameters.verify_renderer, parameters.verify_formatter] @pytest.mark.parametrize( 'cls', [graphviz.Graph, graphviz.Digraph, graphviz.Source]) def test_parameters(cls,... | format | 38 | 4 |
xflr6/graphviz | train | 240 | acf79bca4518781cad02c102e89ec4e9ce757088 | train | tests/test_parameters.py | test | xflr6/graphviz:tests/test_parameters.py | 51 | 4 | assert | test_verify_parameter_none_required_false_passes | import pytest
import graphviz
from graphviz import parameters
VERIFY_FUNCS = [parameters.verify_engine,
parameters.verify_format,
parameters.verify_renderer,
parameters.verify_formatter]
@pytest.mark.parametrize(
'cls', [graphviz.Graph, graphviz.Digraph, graphviz.... | None | modified | dbe1a3bf8bb1627ab58c5fc7560151a4fc5ae8d6c8c323c2387c91c2c670a67c | assert|test_verify_parameter_none_required_false_passes|import pytest import graphviz from graphviz import parameters VERIFY_FUNCS = [parameters.verify_engine, parameters.verify_format, parameters.verify_renderer, parameters.verify_formatter] @pytest.mark.parametrize( 'cls', [graphviz.Graph, graphviz.Digraph, graphviz.... | None | 53 | 4 |
yezz123/authx | train | 0 | a1581ee0cbce3d1db8447900c30e11cd2b4dfc61 | train | tests/test_core_jwt.py | train | yezz123/authx:tests/test_core_jwt.py | 64 | 4 | assert | test_create_tokens | from datetime import datetime
import pytest
from AuthX.core.jwt import JWTBackend
from .utils import MockCacheBackend, private_key, public_key
jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10)
sample_access_token = jwt_backend.create_access_token({"id": 1})
sample_refresh_token = jw... | None | added | 669d25006498b2030deba0449ad2907b4bff26966e7dcbb3f7188e6a930a0bc9 | assert|test_create_tokens|from datetime import datetime import pytest from AuthX.core.jwt import JWTBackend from .utils import MockCacheBackend, private_key, public_key jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10) sample_access_token = jwt_backend.create_access_token({"id": 1}) sam... | null | null | null |
yezz123/authx | train | 0 | a1581ee0cbce3d1db8447900c30e11cd2b4dfc61 | train | tests/test_core_user.py | train | yezz123/authx:tests/test_core_user.py | 31 | 4 | assert | test_anonim_user | import pytest
from AuthX.core.jwt import JWTBackend
from AuthX.core.user import User
from .utils import MockCacheBackend, private_key, public_key
jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10)
ID = 1
USERNAME = "admin"
PERMISSIONS = ["admin"]
sample_access_token = jwt_backend.crea... | None | added | 1cc209a18ecf014bab68945ef6c3dfbee9549422a83547d8a63691c8f8108ab8 | assert|test_anonim_user|import pytest from AuthX.core.jwt import JWTBackend from AuthX.core.user import User from .utils import MockCacheBackend, private_key, public_key jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10) ID = 1 USERNAME = "admin" PERMISSIONS = ["admin"] sample_access_tok... | null | null | null |
yezz123/authx | train | 0 | a1581ee0cbce3d1db8447900c30e11cd2b4dfc61 | train | tests/test_routers_admin.py | train | yezz123/authx:tests/test_routers_admin.py | 89 | 8 | assert_* | test_get_id_by_username | from unittest import mock
from AuthX.routers import get_admin_router
from fastapi import FastAPI
from fastapi.testclient import TestClient
from .utils import mock_admin_required
app = FastAPI()
router = get_admin_router(None, mock_admin_required,)
app.include_router(router)
test_client = TestClient(app)
ACCESS_... | "admin") | added | 7f0f320500830579b521aab5805fce790ad312aea13a4782b2b46c42d36e5e57 | assert_*|test_get_id_by_username|from unittest import mock from AuthX.routers import get_admin_router from fastapi import FastAPI from fastapi.testclient import TestClient from .utils import mock_admin_required app = FastAPI() router = get_admin_router(None, mock_admin_required,) app.include_router(router) test_client ... | null | null | null |
yezz123/authx | train | 0 | a1581ee0cbce3d1db8447900c30e11cd2b4dfc61 | train | tests/test_routers_auth.py | train | yezz123/authx:tests/test_routers_auth.py | 61 | 4 | assert | test_register | from unittest import mock
from AuthX.routers import get_auth_router
from fastapi import FastAPI
from fastapi.testclient import TestClient
from .utils import (
ACCESS_COOKIE_NAME,
REFRESH_COOKIE_NAME,
MockAuthBackend,
mock_get_authenticated_user,
private_key,
public_key,
)
app = FastAPI()
rou... | REFRESH_TOKEN | added | 59440519fc1d1feb644e3c3c7e810ff1e9cc0bc9380385ad8b17d8b403315c63 | assert|test_register|from unittest import mock from AuthX.routers import get_auth_router from fastapi import FastAPI from fastapi.testclient import TestClient from .utils import ( ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend, mock_get_authenticated_user, private_key, public_key, ) app = FastAPI() router = g... | null | null | null |
yezz123/authx | train | 0 | a1581ee0cbce3d1db8447900c30e11cd2b4dfc61 | train | tests/test_routers_social.py | train | yezz123/authx:tests/test_routers_social.py | 74 | 4 | assert | test_callback | from unittest import mock
import pytest
from AuthX.routers import get_social_router
from fastapi import FastAPI
from fastapi.testclient import TestClient
from starlette.middleware.sessions import SessionMiddleware
from .utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend
app = FastAPI()
app.add_mi... | ACCESS_TOKEN | added | 8613c796f06b0127fdea9eeeadb881543f28e43a95d0c81caf5a8524f98b9a86 | assert|test_callback|from unittest import mock import pytest from AuthX.routers import get_social_router from fastapi import FastAPI from fastapi.testclient import TestClient from starlette.middleware.sessions import SessionMiddleware from .utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend app = Fas... | null | null | null |
yezz123/authx | train | 0 | a1581ee0cbce3d1db8447900c30e11cd2b4dfc61 | train | tests/test_routers_social.py | train | yezz123/authx:tests/test_routers_social.py | 75 | 4 | assert | test_callback | from unittest import mock
import pytest
from AuthX.routers import get_social_router
from fastapi import FastAPI
from fastapi.testclient import TestClient
from starlette.middleware.sessions import SessionMiddleware
from .utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend
app = FastAPI()
app.add_mi... | REFRESH_TOKEN | added | 9f8c8a076fb971945f9432f601f1d5f67323516fc6f0ec362dc0056708c3b4b5 | assert|test_callback|from unittest import mock import pytest from AuthX.routers import get_social_router from fastapi import FastAPI from fastapi.testclient import TestClient from starlette.middleware.sessions import SessionMiddleware from .utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend app = Fas... | null | null | null |
yezz123/authx | train | 0 | a1581ee0cbce3d1db8447900c30e11cd2b4dfc61 | train | tests/test_services_auth.py | train | yezz123/authx:tests/test_services_auth.py | 175 | 9 | pytest.raises | test_request_email_confirmation_confirmed | from unittest import mock
import pytest
from AuthX.api import UsersRepo
from AuthX.services import AuthService
from AuthX.utils.strings import create_random_string, hash_string
from fastapi import HTTPException
from .utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
User,
mock... | HTTPException) | added | 31841f2a90e30b0d101c7609747b391a91c40b4352f23633fec3adfc0c3b5101 | pytest.raises|test_request_email_confirmation_confirmed|from unittest import mock import pytest from AuthX.api import UsersRepo from AuthX.services import AuthService from AuthX.utils.strings import create_random_string, hash_string from fastapi import HTTPException from .utils import ( MockAuthBackend, MockCacheBacken... | null | null | null |
yezz123/authx | train | 0 | a1581ee0cbce3d1db8447900c30e11cd2b4dfc61 | train | tests/test_services_password.py | test | yezz123/authx:tests/test_services_password.py | 105 | 9 | pytest.raises | test_password_change | from unittest import mock
import pytest
from AuthX.api import UsersRepo
from AuthX.services import PasswordService
from AuthX.utils.strings import create_random_string, hash_string
from fastapi import HTTPException
from .utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
MockEmailC... | HTTPException) | added | 24889dd3b5511544d0734648a4c82b8942af45a0071fa092d93e6f0274d1f6bc | pytest.raises|test_password_change|from unittest import mock import pytest from AuthX.api import UsersRepo from AuthX.services import PasswordService from AuthX.utils.strings import create_random_string, hash_string from fastapi import HTTPException from .utils import ( MockAuthBackend, MockCacheBackend, MockDatabaseBa... | null | null | null |
yezz123/authx | train | 1 | b805a0ea294c80f47b68e4721f45953ea22c6159 | train | tests/test_routers_admin.py | train | yezz123/authx:tests/test_routers_admin.py | 90 | 8 | assert_* | test_get_id_by_username | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from AuthX.routers import get_admin_router
from .utils import mock_admin_required
app = FastAPI()
router = get_admin_router(None, mock_admin_required,)
app.include_router(router)
test_client = TestClient(app)
ACCESS... | "admin") | modified | f3875cf4c8008224b9ab28870a0ed8c36044ce7c70cfd3800039b7dda0959dbf | assert_*|test_get_id_by_username|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from AuthX.routers import get_admin_router from .utils import mock_admin_required app = FastAPI() router = get_admin_router(None, mock_admin_required,) app.include_router(router) test_client ... | "admin") | 89 | 8 |
yezz123/authx | train | 1 | b805a0ea294c80f47b68e4721f45953ea22c6159 | train | tests/test_routers_auth.py | train | yezz123/authx:tests/test_routers_auth.py | 78 | 4 | assert | test_login | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from AuthX.routers import get_auth_router
from .utils import (
ACCESS_COOKIE_NAME,
REFRESH_COOKIE_NAME,
MockAuthBackend,
mock_get_authenticated_user,
private_key,
public_key,
)
app = FastAPI()
ro... | REFRESH_TOKEN | modified | 2a66783f3dd9192b649cb7739a9966d466194437bd57b6403da739f8f8a0fc7c | assert|test_login|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from AuthX.routers import get_auth_router from .utils import ( ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend, mock_get_authenticated_user, private_key, public_key, ) app = FastAPI() router = get_... | REFRESH_TOKEN | 77 | 4 |
yezz123/authx | train | 1 | b805a0ea294c80f47b68e4721f45953ea22c6159 | train | tests/test_routers_auth.py | train | yezz123/authx:tests/test_routers_auth.py | 111 | 4 | assert | test_refresh_access_token | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from AuthX.routers import get_auth_router
from .utils import (
ACCESS_COOKIE_NAME,
REFRESH_COOKIE_NAME,
MockAuthBackend,
mock_get_authenticated_user,
private_key,
public_key,
)
app = FastAPI()
ro... | ACCESS_TOKEN | modified | e4bf694540b73cfd1669107910bab75758bd4424aab36176109637dca9af97b9 | assert|test_refresh_access_token|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from AuthX.routers import get_auth_router from .utils import ( ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend, mock_get_authenticated_user, private_key, public_key, ) app = FastAPI(... | ACCESS_TOKEN | 110 | 4 |
yezz123/authx | train | 1 | b805a0ea294c80f47b68e4721f45953ea22c6159 | train | tests/test_routers_social.py | train | yezz123/authx:tests/test_routers_social.py | 75 | 4 | assert | test_callback | from unittest import mock
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from starlette.middleware.sessions import SessionMiddleware
from AuthX.routers import get_social_router
from .utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend
app = FastAPI()
app.add_m... | ACCESS_TOKEN | modified | 1908dbe3bb04d7b0762580b0e76a1f17cf3099758fb353e55fa2f02acb1baea6 | assert|test_callback|from unittest import mock import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from starlette.middleware.sessions import SessionMiddleware from AuthX.routers import get_social_router from .utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend app = Fas... | ACCESS_TOKEN | 74 | 4 |
yezz123/authx | train | 1 | b805a0ea294c80f47b68e4721f45953ea22c6159 | train | tests/test_services_auth.py | train | yezz123/authx:tests/test_services_auth.py | 138 | 4 | assert | test_login | from unittest import mock
import pytest
from fastapi import HTTPException
from AuthX.api import UsersRepo
from AuthX.services import AuthService
from AuthX.utils.strings import create_random_string, hash_string
from .utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
User,
moc... | isinstance(tokens, dict) | modified | dc2caacdb38e1933ae5882fdd9c6d2656a39ad44379fab36ac3e4f28e89ef067 | assert|test_login|from unittest import mock import pytest from fastapi import HTTPException from AuthX.api import UsersRepo from AuthX.services import AuthService from AuthX.utils.strings import create_random_string, hash_string from .utils import ( MockAuthBackend, MockCacheBackend, MockDatabaseBackend, User, mock_ver... | isinstance(tokens, dict) | 137 | 4 |
yezz123/authx | train | 1 | b805a0ea294c80f47b68e4721f45953ea22c6159 | train | tests/test_services_auth.py | train | yezz123/authx:tests/test_services_auth.py | 212 | 4 | assert | test_confirm_email | from unittest import mock
import pytest
from fastapi import HTTPException
from AuthX.api import UsersRepo
from AuthX.services import AuthService
from AuthX.utils.strings import create_random_string, hash_string
from .utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
User,
moc... | item.get("confirmed") | modified | dc4922e49c10a587ab6b3968ae428dd87f8c4d790099dd6a24d1baa76bc86ae8 | assert|test_confirm_email|from unittest import mock import pytest from fastapi import HTTPException from AuthX.api import UsersRepo from AuthX.services import AuthService from AuthX.utils.strings import create_random_string, hash_string from .utils import ( MockAuthBackend, MockCacheBackend, MockDatabaseBackend, User, ... | item.get("confirmed") | 211 | 4 |
yezz123/authx | train | 1 | b805a0ea294c80f47b68e4721f45953ea22c6159 | train | tests/test_services_password.py | test | yezz123/authx:tests/test_services_password.py | 66 | 4 | assert | test_password_status | from unittest import mock
import pytest
from fastapi import HTTPException
from AuthX.api import UsersRepo
from AuthX.services import PasswordService
from AuthX.utils.strings import create_random_string, hash_string
from .utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
MockEmail... | isinstance(res, dict) | added | b88a65df766124dc6cc6359174a4f94ff4c8df4b3645f3c82ddd8cf525791360 | assert|test_password_status|from unittest import mock import pytest from fastapi import HTTPException from AuthX.api import UsersRepo from AuthX.services import PasswordService from AuthX.utils.strings import create_random_string, hash_string from .utils import ( MockAuthBackend, MockCacheBackend, MockDatabaseBackend, ... | null | null | null |
yezz123/authx | train | 1 | b805a0ea294c80f47b68e4721f45953ea22c6159 | train | tests/test_services_password.py | test | yezz123/authx:tests/test_services_password.py | 115 | 4 | assert | test_password_change | from unittest import mock
import pytest
from fastapi import HTTPException
from AuthX.api import UsersRepo
from AuthX.services import PasswordService
from AuthX.utils.strings import create_random_string, hash_string
from .utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
MockEmail... | HTTPException | modified | 221ca096248c2c6e42f8ae88f2d8116fce7defee2bb65c815d2eba7c535ff59c | assert|test_password_change|from unittest import mock import pytest from fastapi import HTTPException from AuthX.api import UsersRepo from AuthX.services import PasswordService from AuthX.utils.strings import create_random_string, hash_string from .utils import ( MockAuthBackend, MockCacheBackend, MockDatabaseBackend, ... | HTTPException | 114 | 4 |
yezz123/authx | train | 2 | a0facc7cbbe225545e5f3caa784e93e029ae149e | train | tests/routers/test_routers_admin.py | train | yezz123/authx:tests/routers/test_routers_admin.py | 89 | 8 | assert_* | test_get_id_by_username | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from AuthX.routers.admin import get_router as get_admin_router
from tests.utils import mock_admin_required
app = FastAPI()
router = get_admin_router(None, mock_admin_required,)
app.include_router(router)
test_client =... | "admin") | modified | d1a5052c5b714c81a0a1236b78eafd231b0e9f23316738a7452e125bab757aa5 | assert_*|test_get_id_by_username|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from AuthX.routers.admin import get_router as get_admin_router from tests.utils import mock_admin_required app = FastAPI() router = get_admin_router(None, mock_admin_required,) app.include_ro... | "admin") | 90 | 8 |
yezz123/authx | train | 2 | a0facc7cbbe225545e5f3caa784e93e029ae149e | train | tests/routers/test_routers_auth.py | train | yezz123/authx:tests/routers/test_routers_auth.py | 51 | 4 | assert | test_token | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from AuthX.routers.auth import get_router as get_auth_router
from tests.utils import (
ACCESS_COOKIE_NAME,
REFRESH_COOKIE_NAME,
MockAuthBackend,
mock_get_authenticated_user,
)
app = FastAPI()
router = get... | "user" | added | 0eb72d8211c7781482c5fb2dfc32235cb742d0a44dab7418ba4837ad2d4d005c | assert|test_token|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from AuthX.routers.auth import get_router as get_auth_router from tests.utils import ( ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend, mock_get_authenticated_user, ) app = FastAPI() router = get_a... | null | null | null |
yezz123/authx | train | 2 | a0facc7cbbe225545e5f3caa784e93e029ae149e | train | tests/routers/test_routers_auth.py | train | yezz123/authx:tests/routers/test_routers_auth.py | 96 | 8 | assert_* | test_change_username | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from AuthX.routers.auth import get_router as get_auth_router
from tests.utils import (
ACCESS_COOKIE_NAME,
REFRESH_COOKIE_NAME,
MockAuthBackend,
mock_get_authenticated_user,
)
app = FastAPI()
router = get... | new_username) | added | e707c058bbdda7192f7a575ed2972704f51c542077de7025dafaad481f1b2588 | assert_*|test_change_username|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from AuthX.routers.auth import get_router as get_auth_router from tests.utils import ( ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend, mock_get_authenticated_user, ) app = FastAPI() ro... | null | null | null |
yezz123/authx | train | 3 | aae157e59364add5997fe9d2c7c388c22308cfbf | train | tests/core/test_core_jwt.py | test | yezz123/authx:tests/core/test_core_jwt.py | 65 | 4 | assert | test_create_tokens | from datetime import datetime
import pytest
from AuthX.core.jwt import JWTBackend
from tests.utils import MockCacheBackend, private_key, public_key
jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10)
sample_access_token = jwt_backend.create_access_token({"id": 1})
sample_refresh_token... | None | added | afd2584182b5b1d8f76602b49a4c365bc4a55eb31681ab9473f0a0e1fbf3c61f | assert|test_create_tokens|from datetime import datetime import pytest from AuthX.core.jwt import JWTBackend from tests.utils import MockCacheBackend, private_key, public_key jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10) sample_access_token = jwt_backend.create_access_token({"id": 1}... | null | null | null |
yezz123/authx | train | 3 | aae157e59364add5997fe9d2c7c388c22308cfbf | train | tests/core/test_core_user.py | train | yezz123/authx:tests/core/test_core_user.py | 29 | 4 | assert | test_anonim_user | import pytest
from AuthX.core.jwt import JWTBackend
from AuthX.core.user import User
from tests.utils import MockCacheBackend, private_key, public_key
jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10)
ID = 1
USERNAME = "admin"
PERMISSIONS = ["admin"]
sample_access_token = jwt_backend... | not anonim_user.is_authenticated | added | 34000c2ac9df456c701b7cd7432f47562cc19621dfd732b2fff31d99a58fb643 | assert|test_anonim_user|import pytest from AuthX.core.jwt import JWTBackend from AuthX.core.user import User from tests.utils import MockCacheBackend, private_key, public_key jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10) ID = 1 USERNAME = "admin" PERMISSIONS = ["admin"] sample_acces... | null | null | null |
yezz123/authx | train | 3 | aae157e59364add5997fe9d2c7c388c22308cfbf | train | tests/routers/test_routers_admin.py | train | yezz123/authx:tests/routers/test_routers_admin.py | 89 | 8 | assert_* | test_get_id_by_username | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from AuthX.routers import get_admin_router
from tests.utils import mock_admin_required
app = FastAPI()
router = get_admin_router(None, mock_admin_required,)
app.include_router(router)
test_client = TestClient(app)
AC... | "admin") | modified | 15394a7cfa665c053aa84822dcfd9a8a355c3f5d73e394721066a61c2ab8a77e | assert_*|test_get_id_by_username|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from AuthX.routers import get_admin_router from tests.utils import mock_admin_required app = FastAPI() router = get_admin_router(None, mock_admin_required,) app.include_router(router) test_cl... | "admin") | 89 | 8 |
yezz123/authx | train | 3 | aae157e59364add5997fe9d2c7c388c22308cfbf | train | tests/routers/test_routers_auth.py | train | yezz123/authx:tests/routers/test_routers_auth.py | 60 | 4 | assert | test_register | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from AuthX.routers import get_auth_router
from tests.utils import (
ACCESS_COOKIE_NAME,
REFRESH_COOKIE_NAME,
MockAuthBackend,
mock_get_authenticated_user,
private_key,
public_key,
)
app = FastAPI()... | ACCESS_TOKEN | added | 5366378171bb9ac100822d8964328572e344d0a894f18a10d1bb0bcd508ee43f | assert|test_register|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from AuthX.routers import get_auth_router from tests.utils import ( ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend, mock_get_authenticated_user, private_key, public_key, ) app = FastAPI() route... | null | null | null |
yezz123/authx | train | 3 | aae157e59364add5997fe9d2c7c388c22308cfbf | train | tests/routers/test_routers_social.py | train | yezz123/authx:tests/routers/test_routers_social.py | 75 | 4 | assert | test_callback | from unittest import mock
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from starlette.middleware.sessions import SessionMiddleware
from AuthX.routers import get_social_router
from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend
app = FastAPI()
app.a... | REFRESH_TOKEN | added | 45ddc8b0b5d2b65dc8e34baef41e140cbd5d9339bb4200eb17340fe4602af0bd | assert|test_callback|from unittest import mock import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from starlette.middleware.sessions import SessionMiddleware from AuthX.routers import get_social_router from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend app ... | null | null | null |
yezz123/authx | train | 3 | aae157e59364add5997fe9d2c7c388c22308cfbf | train | tests/services/test_services_auth.py | test | yezz123/authx:tests/services/test_services_auth.py | 153 | 4 | assert | test_get_email_confirmation_status | from unittest import mock
import pytest
from fastapi import HTTPException
from AuthX.api import UsersRepo
from AuthX.services import AuthService
from AuthX.utils.strings import create_random_string, hash_string
from tests.utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
User,
... | email | added | 9920cffc27504329bd583f8b0531a83997edfc2f86855723cbb8024b91694070 | assert|test_get_email_confirmation_status|from unittest import mock import pytest from fastapi import HTTPException from AuthX.api import UsersRepo from AuthX.services import AuthService from AuthX.utils.strings import create_random_string, hash_string from tests.utils import ( MockAuthBackend, MockCacheBackend, MockDa... | null | null | null |
yezz123/authx | train | 3 | aae157e59364add5997fe9d2c7c388c22308cfbf | train | tests/services/test_services_auth.py | test | yezz123/authx:tests/services/test_services_auth.py | 182 | 4 | assert | test_request_email_confirmation | from unittest import mock
import pytest
from fastapi import HTTPException
from AuthX.api import UsersRepo
from AuthX.services import AuthService
from AuthX.utils.strings import create_random_string, hash_string
from tests.utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
User,
... | None | added | 015379502cc4bb6de06445648772977fa5206709fb12163cfc8f54309c13365e | assert|test_request_email_confirmation|from unittest import mock import pytest from fastapi import HTTPException from AuthX.api import UsersRepo from AuthX.services import AuthService from AuthX.utils.strings import create_random_string, hash_string from tests.utils import ( MockAuthBackend, MockCacheBackend, MockDatab... | null | null | null |
yezz123/authx | train | 3 | aae157e59364add5997fe9d2c7c388c22308cfbf | train | tests/services/test_services_password.py | train | yezz123/authx:tests/services/test_services_password.py | 97 | 4 | assert | test_password_reset | from unittest import mock
import pytest
from fastapi import HTTPException
from AuthX.api import UsersRepo
from AuthX.services import PasswordService
from AuthX.utils.strings import create_random_string, hash_string
from tests.utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
MockE... | "12345678" | added | 9e54dcbe10601b5449ca9f202454fbbabd7853078dc00f4955e2186df922e3ce | assert|test_password_reset|from unittest import mock import pytest from fastapi import HTTPException from AuthX.api import UsersRepo from AuthX.services import PasswordService from AuthX.utils.strings import create_random_string, hash_string from tests.utils import ( MockAuthBackend, MockCacheBackend, MockDatabaseBacke... | null | null | null |
yezz123/authx | train | 4 | 6feac5b12135be3067cd2fb911c1705a5f4e5a9a | train | tests/core/test_core_jwt.py | test | yezz123/authx:tests/core/test_core_jwt.py | 70 | 4 | assert | test_create_refresh_token | from datetime import datetime
import pytest
from AuthX.core.jwt import JWTBackend
from tests.utils import MockCacheBackend, private_key, public_key
jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10)
sample_access_token = jwt_backend.create_access_token({"id": 1})
sample_refresh_token... | "refresh" | added | d55b535f9d7818a48e42e0e4d6456faf9f004d2a35f2eda6f6dc99129b9bae24 | assert|test_create_refresh_token|from datetime import datetime import pytest from AuthX.core.jwt import JWTBackend from tests.utils import MockCacheBackend, private_key, public_key jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10) sample_access_token = jwt_backend.create_access_token({"... | null | null | null |
yezz123/authx | train | 4 | 6feac5b12135be3067cd2fb911c1705a5f4e5a9a | train | tests/core/test_core_jwt.py | test | yezz123/authx:tests/core/test_core_jwt.py | 107 | 4 | assert | test_logout | from datetime import datetime
import pytest
from AuthX.core.jwt import JWTBackend
from tests.utils import MockCacheBackend, private_key, public_key
jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10)
sample_access_token = jwt_backend.create_access_token({"id": 1})
sample_refresh_token... | None | added | bba64709c1b9253d3de711a93330cbd29bf077d5c7131a8270e3184c7f08d0a5 | assert|test_logout|from datetime import datetime import pytest from AuthX.core.jwt import JWTBackend from tests.utils import MockCacheBackend, private_key, public_key jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10) sample_access_token = jwt_backend.create_access_token({"id": 1}) sampl... | null | null | null |
yezz123/authx | train | 4 | 6feac5b12135be3067cd2fb911c1705a5f4e5a9a | train | tests/core/test_core_user.py | train | yezz123/authx:tests/core/test_core_user.py | 23 | 4 | assert | test_user | import pytest
from AuthX.core.jwt import JWTBackend
from AuthX.core.user import User
from tests.utils import MockCacheBackend, private_key, public_key
jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10)
ID = 1
USERNAME = "admin"
PERMISSIONS = ["admin"]
sample_access_token = jwt_backend... | user.is_authenticated | modified | 7eab63e9dfd16254f41944f794fe4b2615816de726de7e731eaf533456084f39 | assert|test_user|import pytest from AuthX.core.jwt import JWTBackend from AuthX.core.user import User from tests.utils import MockCacheBackend, private_key, public_key jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10) ID = 1 USERNAME = "admin" PERMISSIONS = ["admin"] sample_access_token... | user.is_authenticated | 20 | 4 |
yezz123/authx | train | 4 | 6feac5b12135be3067cd2fb911c1705a5f4e5a9a | train | tests/routers/test_routers_admin.py | train | yezz123/authx:tests/routers/test_routers_admin.py | 107 | 8 | assert_* | test_get_id_by_username | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from AuthX.routers import get_admin_router
from tests.utils import mock_admin_required
app = FastAPI()
router = get_admin_router(None, mock_admin_required,)
app.include_router(router)
test_client = TestClient(app)
AC... | "admin") | added | 74bbae3ad072fcc1b2c9ee3a24fc8498d206c0b42de73bb9d4aa23a9d409e7f2 | assert_*|test_get_id_by_username|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from AuthX.routers import get_admin_router from tests.utils import mock_admin_required app = FastAPI() router = get_admin_router(None, mock_admin_required,) app.include_router(router) test_cl... | null | null | null |
yezz123/authx | train | 4 | 6feac5b12135be3067cd2fb911c1705a5f4e5a9a | train | tests/routers/test_routers_auth.py | train | yezz123/authx:tests/routers/test_routers_auth.py | 182 | 8 | assert_* | test_change_username | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from AuthX.routers import get_auth_router
from tests.utils import (
ACCESS_COOKIE_NAME,
REFRESH_COOKIE_NAME,
MockAuthBackend,
mock_get_authenticated_user,
private_key,
public_key,
)
app = FastAPI()... | new_username) | added | 10ba7c308649b66fac573e96993c4c0e00d1a2303f71bdaffe76c3beca6fcb58 | assert_*|test_change_username|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from AuthX.routers import get_auth_router from tests.utils import ( ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend, mock_get_authenticated_user, private_key, public_key, ) app = FastAP... | null | null | null |
yezz123/authx | train | 4 | 6feac5b12135be3067cd2fb911c1705a5f4e5a9a | train | tests/routers/test_routers_social.py | train | yezz123/authx:tests/routers/test_routers_social.py | 86 | 4 | assert | test_callback | from unittest import mock
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from starlette.middleware.sessions import SessionMiddleware
from AuthX.routers import get_social_router
from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend
app = FastAPI()
app.a... | ACCESS_TOKEN | added | 8227cc5c5c5b8c1b19857dfa2bb40b9cb8fed6ff5708ee1a9717d70385b8fcfe | assert|test_callback|from unittest import mock import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from starlette.middleware.sessions import SessionMiddleware from AuthX.routers import get_social_router from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend app ... | null | null | null |
yezz123/authx | train | 4 | 6feac5b12135be3067cd2fb911c1705a5f4e5a9a | train | tests/services/test_services_auth.py | test | yezz123/authx:tests/services/test_services_auth.py | 148 | 4 | assert | test_login | from unittest import mock
import pytest
from fastapi import HTTPException
from AuthX.api import UsersRepo
from AuthX.services import AuthService
from AuthX.utils.strings import create_random_string, hash_string
from tests.utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
User,
... | isinstance(tokens, dict) | added | 7d10fe002e47aef1f27d747279c33d76eb9d518c48d7437749380dd9fda6d545 | assert|test_login|from unittest import mock import pytest from fastapi import HTTPException from AuthX.api import UsersRepo from AuthX.services import AuthService from AuthX.utils.strings import create_random_string, hash_string from tests.utils import ( MockAuthBackend, MockCacheBackend, MockDatabaseBackend, User, moc... | null | null | null |
yezz123/authx | train | 4 | 6feac5b12135be3067cd2fb911c1705a5f4e5a9a | train | tests/services/test_services_password.py | train | yezz123/authx:tests/services/test_services_password.py | 93 | 4 | assert | test_password_set | from unittest import mock
import pytest
from fastapi import HTTPException
from AuthX.api import UsersRepo
from AuthX.services import PasswordService
from AuthX.utils.strings import create_random_string, hash_string
from tests.utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
MockE... | HTTPException | added | 04d52ae76a6545426a7113079ab089f256a0c5b8cc215fc9154ed0f914ed6a12 | assert|test_password_set|from unittest import mock import pytest from fastapi import HTTPException from AuthX.api import UsersRepo from AuthX.services import PasswordService from AuthX.utils.strings import create_random_string, hash_string from tests.utils import ( MockAuthBackend, MockCacheBackend, MockDatabaseBackend... | null | null | null |
yezz123/authx | train | 5 | 2003d4d2be9ab860135fbd63d9d5618730830667 | train | tests/core/test_core_user.py | train | yezz123/authx:tests/core/test_core_user.py | 35 | 4 | assert | test_anonym_user | import pytest
from AuthX.core.jwt import JWTBackend
from AuthX.core.user import User
from tests.utils import MockCacheBackend, private_key, public_key
jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10)
ID = 1
USERNAME = "admin"
PERMISSIONS = ["admin"]
sample_access_token = jwt_backend... | not anonym_user.is_authenticated | added | b3963f61d323f3ef0af2913480ec5bb87d5b922213cf4de5bf6dcba52dd13b52 | assert|test_anonym_user|import pytest from AuthX.core.jwt import JWTBackend from AuthX.core.user import User from tests.utils import MockCacheBackend, private_key, public_key jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10) ID = 1 USERNAME = "admin" PERMISSIONS = ["admin"] sample_acces... | null | null | null |
yezz123/authx | train | 5 | 2003d4d2be9ab860135fbd63d9d5618730830667 | train | tests/core/test_core_user.py | train | yezz123/authx:tests/core/test_core_user.py | 36 | 4 | assert | test_anonym_user | import pytest
from AuthX.core.jwt import JWTBackend
from AuthX.core.user import User
from tests.utils import MockCacheBackend, private_key, public_key
jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10)
ID = 1
USERNAME = "admin"
PERMISSIONS = ["admin"]
sample_access_token = jwt_backend... | None | added | dde78484279de1ff29b8fb5cdca5469ba6490541b4d4bd1cd42284d02ce6b0fe | assert|test_anonym_user|import pytest from AuthX.core.jwt import JWTBackend from AuthX.core.user import User from tests.utils import MockCacheBackend, private_key, public_key jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10) ID = 1 USERNAME = "admin" PERMISSIONS = ["admin"] sample_acces... | null | null | null |
yezz123/authx | train | 5 | 2003d4d2be9ab860135fbd63d9d5618730830667 | train | tests/core/test_core_user.py | train | yezz123/authx:tests/core/test_core_user.py | 37 | 4 | assert | test_anonym_user | import pytest
from AuthX.core.jwt import JWTBackend
from AuthX.core.user import User
from tests.utils import MockCacheBackend, private_key, public_key
jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10)
ID = 1
USERNAME = "admin"
PERMISSIONS = ["admin"]
sample_access_token = jwt_backend... | None | added | c9e77a6f79caf1db13aebdb51a30339ac2d214a3ebce0efea8fac264da3d062d | assert|test_anonym_user|import pytest from AuthX.core.jwt import JWTBackend from AuthX.core.user import User from tests.utils import MockCacheBackend, private_key, public_key jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10) ID = 1 USERNAME = "admin" PERMISSIONS = ["admin"] sample_acces... | null | null | null |
yezz123/authx | train | 5 | 2003d4d2be9ab860135fbd63d9d5618730830667 | train | tests/core/test_core_user.py | train | yezz123/authx:tests/core/test_core_user.py | 38 | 4 | assert | test_anonym_user | import pytest
from AuthX.core.jwt import JWTBackend
from AuthX.core.user import User
from tests.utils import MockCacheBackend, private_key, public_key
jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10)
ID = 1
USERNAME = "admin"
PERMISSIONS = ["admin"]
sample_access_token = jwt_backend... | not anonym_user.is_admin | added | 4f6220e2839619d80c3e95b4193d0c7e757530c2a3ae5a534565690659a81a30 | assert|test_anonym_user|import pytest from AuthX.core.jwt import JWTBackend from AuthX.core.user import User from tests.utils import MockCacheBackend, private_key, public_key jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10) ID = 1 USERNAME = "admin" PERMISSIONS = ["admin"] sample_acces... | null | null | null |
yezz123/authx | train | 5 | 2003d4d2be9ab860135fbd63d9d5618730830667 | train | tests/routers/test_routers_social.py | train | yezz123/authx:tests/routers/test_routers_social.py | 86 | 4 | assert | test_callback | from unittest import mock
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from starlette.middleware.sessions import SessionMiddleware
from AuthX.routers import get_social_router
from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend
app = FastAPI()
app.a... | ACCESS_TOKEN | modified | 3ff596c75947494e30d4306c72c4fd3d13c82c6c296e9eb479056653fbb83217 | assert|test_callback|from unittest import mock import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from starlette.middleware.sessions import SessionMiddleware from AuthX.routers import get_social_router from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend app ... | ACCESS_TOKEN | 86 | 4 |
yezz123/authx | train | 5 | 2003d4d2be9ab860135fbd63d9d5618730830667 | train | tests/routers/test_routers_social.py | train | yezz123/authx:tests/routers/test_routers_social.py | 87 | 4 | assert | test_callback | from unittest import mock
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from starlette.middleware.sessions import SessionMiddleware
from AuthX.routers import get_social_router
from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend
app = FastAPI()
app.a... | REFRESH_TOKEN | modified | 2215984f9f790b465ce6f7e71c7791f10373965d2aca46068d0a111eb810b518 | assert|test_callback|from unittest import mock import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from starlette.middleware.sessions import SessionMiddleware from AuthX.routers import get_social_router from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend app ... | REFRESH_TOKEN | 87 | 4 |
yezz123/authx | train | 6 | 649dafc3f18ea3f673d974ed71d4cde1abd18f69 | train | tests/core/test_core_jwt.py | test | yezz123/authx:tests/core/test_core_jwt.py | 107 | 4 | assert | test_logout | from datetime import datetime
import pytest
from authx.core.jwt import JWTBackend
from tests.utils import MockCacheBackend, private_key, public_key
jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10)
sample_access_token = jwt_backend.create_access_token({"id": 1})
sample_refresh_token... | None | modified | 2e83898e715a48b04f6924f7f96c77dfd74983b9c54566b828f869da140ca997 | assert|test_logout|from datetime import datetime import pytest from authx.core.jwt import JWTBackend from tests.utils import MockCacheBackend, private_key, public_key jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10) sample_access_token = jwt_backend.create_access_token({"id": 1}) sampl... | None | 107 | 4 |
yezz123/authx | train | 6 | 649dafc3f18ea3f673d974ed71d4cde1abd18f69 | train | tests/core/test_core_user.py | train | yezz123/authx:tests/core/test_core_user.py | 37 | 4 | assert | test_anonym_user | import pytest
from authx.core.jwt import JWTBackend
from authx.core.user import User
from tests.utils import MockCacheBackend, private_key, public_key
jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10)
ID = 1
USERNAME = "admin"
PERMISSIONS = ["admin"]
sample_access_token = jwt_backend... | None | modified | ea725fb2c1e8319650e5729dd9c1c9c28a7da3afd44f4c15650efaef655f5432 | assert|test_anonym_user|import pytest from authx.core.jwt import JWTBackend from authx.core.user import User from tests.utils import MockCacheBackend, private_key, public_key jwt_backend = JWTBackend(MockCacheBackend(), private_key, public_key, 60, 60 * 10) ID = 1 USERNAME = "admin" PERMISSIONS = ["admin"] sample_acces... | None | 37 | 4 |
yezz123/authx | train | 6 | 649dafc3f18ea3f673d974ed71d4cde1abd18f69 | train | tests/routers/test_routers_admin.py | train | yezz123/authx:tests/routers/test_routers_admin.py | 107 | 8 | assert_* | test_get_id_by_username | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from authx.routers import get_admin_router
from tests.utils import mock_admin_required
app = FastAPI()
router = get_admin_router(None, mock_admin_required,)
app.include_router(router)
test_client = TestClient(app)
AC... | "admin") | modified | 3cc0d495d76d7e624c5502ea11dcf448ad28ae22465e35bad7ccb5a4530e1b5f | assert_*|test_get_id_by_username|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from authx.routers import get_admin_router from tests.utils import mock_admin_required app = FastAPI() router = get_admin_router(None, mock_admin_required,) app.include_router(router) test_cl... | "admin") | 107 | 8 |
yezz123/authx | train | 6 | 649dafc3f18ea3f673d974ed71d4cde1abd18f69 | train | tests/routers/test_routers_auth.py | train | yezz123/authx:tests/routers/test_routers_auth.py | 182 | 8 | assert_* | test_change_username | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from authx.routers import get_auth_router
from tests.utils import (
ACCESS_COOKIE_NAME,
REFRESH_COOKIE_NAME,
MockAuthBackend,
mock_get_authenticated_user,
private_key,
public_key,
)
app = FastAPI()... | new_username) | modified | 67f535ad134ae98d9a1da0c2fbec390eca75974b698e67ea57c5a5e895e12092 | assert_*|test_change_username|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from authx.routers import get_auth_router from tests.utils import ( ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend, mock_get_authenticated_user, private_key, public_key, ) app = FastAP... | new_username) | 182 | 8 |
yezz123/authx | train | 6 | 649dafc3f18ea3f673d974ed71d4cde1abd18f69 | train | tests/routers/test_routers_social.py | train | yezz123/authx:tests/routers/test_routers_social.py | 87 | 4 | assert | test_callback | from unittest import mock
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from starlette.middleware.sessions import SessionMiddleware
from authx.routers import get_social_router
from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend
app = FastAPI()
app.a... | REFRESH_TOKEN | added | 969ec26a22c434e1cdb6bb882236ad03233dd42d091e941929f92601812df906 | assert|test_callback|from unittest import mock import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from starlette.middleware.sessions import SessionMiddleware from authx.routers import get_social_router from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend app ... | null | null | null |
yezz123/authx | train | 6 | 649dafc3f18ea3f673d974ed71d4cde1abd18f69 | train | tests/services/test_services_auth.py | test | yezz123/authx:tests/services/test_services_auth.py | 95 | 17 | pytest.raises | test_register | from unittest import mock
import pytest
from fastapi import HTTPException
from authx.api import UsersRepo
from authx.services import AuthService
from authx.utils.strings import create_random_string, hash_string
from tests.utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
User,
... | HTTPException) | modified | aff0ff0bd61c0856309913722b4f953daa5691209765c2f76bdbf8bfdb9b3b15 | pytest.raises|test_register|from unittest import mock import pytest from fastapi import HTTPException from authx.api import UsersRepo from authx.services import AuthService from authx.utils.strings import create_random_string, hash_string from tests.utils import ( MockAuthBackend, MockCacheBackend, MockDatabaseBackend,... | HTTPException) | 95 | 17 |
yezz123/authx | train | 6 | 649dafc3f18ea3f673d974ed71d4cde1abd18f69 | train | tests/services/test_services_auth.py | test | yezz123/authx:tests/services/test_services_auth.py | 190 | 4 | assert | test_request_email_confirmation_confirmed | from unittest import mock
import pytest
from fastapi import HTTPException
from authx.api import UsersRepo
from authx.services import AuthService
from authx.utils.strings import create_random_string, hash_string
from tests.utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
User,
... | HTTPException | modified | e490ae9e023e8ee0c79df6c5a46cdc8e6146647a1a0e1157451bd3ade51d7881 | assert|test_request_email_confirmation_confirmed|from unittest import mock import pytest from fastapi import HTTPException from authx.api import UsersRepo from authx.services import AuthService from authx.utils.strings import create_random_string, hash_string from tests.utils import ( MockAuthBackend, MockCacheBackend,... | HTTPException | 190 | 4 |
yezz123/authx | train | 6 | 649dafc3f18ea3f673d974ed71d4cde1abd18f69 | train | tests/services/test_services_password.py | train | yezz123/authx:tests/services/test_services_password.py | 74 | 4 | assert | test_password_status | from unittest import mock
import pytest
from fastapi import HTTPException
from authx.api import UsersRepo
from authx.services import PasswordService
from authx.utils.strings import create_random_string, hash_string
from tests.utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
MockE... | isinstance(res, dict) | modified | c6c22f802ac6e84ba8bd914ead3dd65e63947ad7183d21e02c42dc51a9ba772e | assert|test_password_status|from unittest import mock import pytest from fastapi import HTTPException from authx.api import UsersRepo from authx.services import PasswordService from authx.utils.strings import create_random_string, hash_string from tests.utils import ( MockAuthBackend, MockCacheBackend, MockDatabaseBack... | isinstance(res, dict) | 74 | 4 |
yezz123/authx | train | 7 | e6f55d6435f51091d56c7014f1ab826e6ee8d031 | train | tests/routers/test_routers_auth.py | train | yezz123/authx:tests/routers/test_routers_auth.py | 105 | 4 | assert | test_token | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from authx.routers import get_auth_router
from tests.utils import (
ACCESS_COOKIE_NAME,
REFRESH_COOKIE_NAME,
MockAuthBackend,
mock_get_authenticated_user,
private_key,
public_key,
)
app = FastAPI()... | "user" | modified | 7e3b289078f7445d7a200424b78fc1cac1e7d0524945420e9509d41715096860 | assert|test_token|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from authx.routers import get_auth_router from tests.utils import ( ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend, mock_get_authenticated_user, private_key, public_key, ) app = FastAPI() router =... | "user" | 107 | 4 |
yezz123/authx | train | 7 | e6f55d6435f51091d56c7014f1ab826e6ee8d031 | train | tests/routers/test_routers_auth.py | train | yezz123/authx:tests/routers/test_routers_auth.py | 124 | 4 | assert | test_refresh_access_token | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from authx.routers import get_auth_router
from tests.utils import (
ACCESS_COOKIE_NAME,
REFRESH_COOKIE_NAME,
MockAuthBackend,
mock_get_authenticated_user,
private_key,
public_key,
)
app = FastAPI()... | ACCESS_TOKEN | modified | 5c713bca942d6e7d9b1e3474521cbf619ec705b322087bdcca70c14131a54700 | assert|test_refresh_access_token|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from authx.routers import get_auth_router from tests.utils import ( ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend, mock_get_authenticated_user, private_key, public_key, ) app = Fas... | ACCESS_TOKEN | 126 | 4 |
yezz123/authx | train | 7 | e6f55d6435f51091d56c7014f1ab826e6ee8d031 | train | tests/routers/test_routers_social.py | train | yezz123/authx:tests/routers/test_routers_social.py | 84 | 4 | assert | test_callback | from unittest import mock
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from starlette.middleware.sessions import SessionMiddleware
from authx.routers import get_social_router
from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend
app = FastAPI()
app.a... | ACCESS_TOKEN | modified | b752ad33ce9b347185e20e40e5928c25032b512349eb986b8bcbf54f57ed8c69 | assert|test_callback|from unittest import mock import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from starlette.middleware.sessions import SessionMiddleware from authx.routers import get_social_router from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend app ... | ACCESS_TOKEN | 86 | 4 |
yezz123/authx | train | 7 | e6f55d6435f51091d56c7014f1ab826e6ee8d031 | train | tests/routers/test_routers_social.py | train | yezz123/authx:tests/routers/test_routers_social.py | 85 | 4 | assert | test_callback | from unittest import mock
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from starlette.middleware.sessions import SessionMiddleware
from authx.routers import get_social_router
from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend
app = FastAPI()
app.a... | REFRESH_TOKEN | modified | 89a1b08a6bd242ccabe19bfcb0943e3133c38be1542c375ebbd2b705afa990fe | assert|test_callback|from unittest import mock import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from starlette.middleware.sessions import SessionMiddleware from authx.routers import get_social_router from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend app ... | REFRESH_TOKEN | 87 | 4 |
yezz123/authx | train | 7 | e6f55d6435f51091d56c7014f1ab826e6ee8d031 | train | tests/services/test_services_auth.py | test | yezz123/authx:tests/services/test_services_auth.py | 146 | 4 | assert | test_login | from unittest import mock
import pytest
from fastapi import HTTPException
from authx.api import UsersRepo
from authx.services import AuthService
from authx.utils.strings import create_random_string, hash_string
from tests.utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
User,
... | isinstance(tokens, dict) | modified | d6d6d34dea35add6022529aeeb34696f5afaa094fc8fcec1bcd727077bc89af7 | assert|test_login|from unittest import mock import pytest from fastapi import HTTPException from authx.api import UsersRepo from authx.services import AuthService from authx.utils.strings import create_random_string, hash_string from tests.utils import ( MockAuthBackend, MockCacheBackend, MockDatabaseBackend, User, moc... | isinstance(tokens, dict) | 148 | 4 |
yezz123/authx | train | 7 | e6f55d6435f51091d56c7014f1ab826e6ee8d031 | train | tests/services/test_services_auth.py | test | yezz123/authx:tests/services/test_services_auth.py | 200 | 4 | assert | test_request_email_confirmation | from unittest import mock
import pytest
from fastapi import HTTPException
from authx.api import UsersRepo
from authx.services import AuthService
from authx.utils.strings import create_random_string, hash_string
from tests.utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
User,
... | None | modified | dc7d7898918ab83ed8fb785eaec2c3cea7016d0b936ff9dac7652b26177f06ab | assert|test_request_email_confirmation|from unittest import mock import pytest from fastapi import HTTPException from authx.api import UsersRepo from authx.services import AuthService from authx.utils.strings import create_random_string, hash_string from tests.utils import ( MockAuthBackend, MockCacheBackend, MockDatab... | None | 203 | 4 |
yezz123/authx | train | 7 | e6f55d6435f51091d56c7014f1ab826e6ee8d031 | train | tests/services/test_services_password.py | train | yezz123/authx:tests/services/test_services_password.py | 71 | 4 | assert | test_password_status | from unittest import mock
import pytest
from fastapi import HTTPException
from authx.api import UsersRepo
from authx.services import PasswordService
from authx.utils.strings import create_random_string, hash_string
from tests.utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
MockE... | isinstance(res, dict) | modified | 48032af85ff36227fbdc54e54f125b102f4e1b39ea5cb1efdd94593e53441212 | assert|test_password_status|from unittest import mock import pytest from fastapi import HTTPException from authx.api import UsersRepo from authx.services import PasswordService from authx.utils.strings import create_random_string, hash_string from tests.utils import ( MockAuthBackend, MockCacheBackend, MockDatabaseBack... | isinstance(res, dict) | 74 | 4 |
yezz123/authx | train | 7 | e6f55d6435f51091d56c7014f1ab826e6ee8d031 | train | tests/services/test_services_password.py | train | yezz123/authx:tests/services/test_services_password.py | 90 | 4 | assert | test_password_set | from unittest import mock
import pytest
from fastapi import HTTPException
from authx.api import UsersRepo
from authx.services import PasswordService
from authx.utils.strings import create_random_string, hash_string
from tests.utils import (
MockAuthBackend,
MockCacheBackend,
MockDatabaseBackend,
MockE... | HTTPException | modified | 91d69676444c080e9e265c11cc59ff171a39fa2a038b01472e9a115994fd65e2 | assert|test_password_set|from unittest import mock import pytest from fastapi import HTTPException from authx.api import UsersRepo from authx.services import PasswordService from authx.utils.strings import create_random_string, hash_string from tests.utils import ( MockAuthBackend, MockCacheBackend, MockDatabaseBackend... | HTTPException | 93 | 4 |
yezz123/authx | train | 8 | e1bdde926729cd25f697771eec2a300e029c23b6 | train | tests/routers/test_routers_admin.py | train | yezz123/authx:tests/routers/test_routers_admin.py | 110 | 8 | assert_* | test_get_id_by_username | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from authx.routers import get_admin_router
from tests.utils import mock_admin_required
app = FastAPI()
router = get_admin_router(
None,
mock_admin_required,
)
app.include_router(router)
test_client = TestClien... | "admin") | modified | f2a769eddbaf021bb1e5d624f80c9616cb383580bda80fb1fa63330df8f5ac4f | assert_*|test_get_id_by_username|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from authx.routers import get_admin_router from tests.utils import mock_admin_required app = FastAPI() router = get_admin_router( None, mock_admin_required, ) app.include_router(router) test_... | "admin") | 107 | 8 |
yezz123/authx | train | 8 | e1bdde926729cd25f697771eec2a300e029c23b6 | train | tests/routers/test_routers_auth.py | train | yezz123/authx:tests/routers/test_routers_auth.py | 70 | 4 | assert | test_register | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from authx.routers import get_auth_router
from tests.utils import (
ACCESS_COOKIE_NAME,
REFRESH_COOKIE_NAME,
MockAuthBackend,
mock_get_authenticated_user,
private_key,
public_key,
)
app = FastAPI()... | ACCESS_TOKEN | added | b1039364f3eff192c494220ddd5a62f85778dd481e3ee5310bedcae83640c9fb | assert|test_register|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from authx.routers import get_auth_router from tests.utils import ( ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend, mock_get_authenticated_user, private_key, public_key, ) app = FastAPI() route... | null | null | null |
yezz123/authx | train | 8 | e1bdde926729cd25f697771eec2a300e029c23b6 | train | tests/routers/test_routers_auth.py | train | yezz123/authx:tests/routers/test_routers_auth.py | 89 | 4 | assert | test_login | from unittest import mock
from fastapi import FastAPI
from fastapi.testclient import TestClient
from authx.routers import get_auth_router
from tests.utils import (
ACCESS_COOKIE_NAME,
REFRESH_COOKIE_NAME,
MockAuthBackend,
mock_get_authenticated_user,
private_key,
public_key,
)
app = FastAPI()... | ACCESS_TOKEN | added | f21eef0aa9ae08cb3023c1e60106ae27df91ecd82adc38d5b4bec7832119d067 | assert|test_login|from unittest import mock from fastapi import FastAPI from fastapi.testclient import TestClient from authx.routers import get_auth_router from tests.utils import ( ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend, mock_get_authenticated_user, private_key, public_key, ) app = FastAPI() router =... | null | null | null |
yezz123/authx | train | 8 | e1bdde926729cd25f697771eec2a300e029c23b6 | train | tests/routers/test_routers_social.py | train | yezz123/authx:tests/routers/test_routers_social.py | 96 | 4 | assert | test_callback | from unittest import mock
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from starlette.middleware.sessions import SessionMiddleware
from authx.routers import get_social_router
from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend
app = FastAPI()
app.a... | ACCESS_TOKEN | added | 847742ccca200775e3fe333db4152a41cc1323e2bb0872cbaaa5fdd83c07e9ea | assert|test_callback|from unittest import mock import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from starlette.middleware.sessions import SessionMiddleware from authx.routers import get_social_router from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend app ... | null | null | null |
yezz123/authx | train | 8 | e1bdde926729cd25f697771eec2a300e029c23b6 | train | tests/routers/test_routers_social.py | train | yezz123/authx:tests/routers/test_routers_social.py | 97 | 4 | assert | test_callback | from unittest import mock
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from starlette.middleware.sessions import SessionMiddleware
from authx.routers import get_social_router
from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend
app = FastAPI()
app.a... | REFRESH_TOKEN | added | df20a881ed0cca872a74d5ae312d092f0ba1a374364cff400365a575295cb9aa | assert|test_callback|from unittest import mock import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from starlette.middleware.sessions import SessionMiddleware from authx.routers import get_social_router from tests.utils import ACCESS_COOKIE_NAME, REFRESH_COOKIE_NAME, MockAuthBackend app ... | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.