repo_id
stringclasses
409 values
prefix
large_stringlengths
34
36.3k
target
large_stringlengths
1
498
assertion_type
stringclasses
31 values
difficulty
stringclasses
8 values
test_file
stringlengths
10
121
test_function
stringlengths
1
104
test_class
stringlengths
0
51
lineno
int32
2
11.3k
commit_idx
int32
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( AlgorandEntropyBitLen, AlgorandEntropyGenerator, AlgorandLanguages, AlgorandMnemonicDecoder, AlgorandMnemonicGenerator, AlgorandMnemonicValidator, AlgorandSeedGenerator, AlgorandWordsNum, Bip44, Bip44Coins, MnemonicChec...
mnemonic.ToStr())
self.assertEqual
func_call
tests/algorand/mnemonic/test_algorand_mnemonic.py
test_vector
AlgorandMnemonicTests
144
null
ebellocchia/bip_utils
import binascii import math import unittest from bip_utils import ( BytesUtils, ElectrumV2EntropyBitLen, ElectrumV2EntropyGenerator, ElectrumV2Languages, ElectrumV2MnemonicDecoder, ElectrumV2MnemonicGenerator, ElectrumV2MnemonicTypes, ElectrumV2MnemonicValidator, ElectrumV2SeedGener...
test["exception"])
self.assertRaises
complex_expr
tests/electrum/mnemonic/test_electrum_v2_mnemonic.py
test_invalid_mnemonic
ElectrumV2MnemonicTests
261
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( DataBytes, Sr25519PrivateKey, Sr25519PublicKey, SubstrateKeyError, SubstratePrivateKey, SubstratePublicKey, ) from bip_utils.substrate.conf.substrate_conf import SubstrateConf from tests.ecc.test_ecc import ( TEST_ED25519_BLAKE2B_PRIV_...
pub_key.ToAddress())
self.assertEqual
func_call
tests/substrate/test_substrate_keys.py
__test_pub_key_obj
SubstrateKeysTests
124
null
ebellocchia/bip_utils
import os import random import unittest from bip_utils import Bip32ChainCode, Bip32Depth, Bip32FingerPrint, Bip32KeyData, Bip32KeyIndex from bip_utils.bip.bip32.bip32_key_data import Bip32KeyDataConst class Bip32KeyDataTests(unittest.TestCase): def test_operators(self): self.assertTrue(Bip32Depth(1) < B...
Bip32KeyIndex(1) == 1)
self.assertTrue
func_call
tests/bip/bip32/test_bip32_key_data.py
test_operators
Bip32KeyDataTests
103
null
ebellocchia/bip_utils
from bip_utils import ( Bip32ChainCode, Bip32Depth, Bip32FingerPrint, Bip32KeyData, Bip32KeyError, Bip32KeyIndex, Bip32PrivateKey, Bip32PublicKey, ) from bip_utils.bip.bip32.bip32_const import Bip32Const from tests.ecc.test_ecc import * TEST_PUB_KEYS = [ { "key": TEST_ED2551...
priv_key.Raw().ToBytes())
self.assertEqual
func_call
tests/bip/bip32/test_bip32_keys.py
__test_priv_key_obj
Bip32KeyDataTests
267
null
ebellocchia/bip_utils
import binascii import unittest import coincurve import ecdsa import ed25519_blake2b from ecdsa import ellipticcurve from ecdsa.ecdsa import generator_256, generator_secp256k1 from nacl import signing from bip_utils import ( DataBytes, Ed25519, Ed25519Blake2b, Ed25519Blake2bPoint, Ed25519Blake2bPr...
0)
self.assertEqual
numeric_literal
tests/ecc/test_ecc.py
test_sr25519
EccTests
641
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( Ed25519MoneroPrivateKey, Ed25519MoneroPublicKey, Monero, MoneroCoins, MoneroKeyError, MoneroPrivateKey, MoneroPublicKey, ) from bip_utils.monero.conf import MoneroCoinConf from bip_utils.monero.monero_subaddr import MoneroSubaddressCon...
subaddr)
self.assertEqual
variable
tests/monero/test_monero.py
__test_monero_obj
MoneroTests
482
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( MnemonicChecksumError, Monero, MoneroEntropyBitLen, MoneroEntropyGenerator, MoneroLanguages, MoneroMnemonicDecoder, MoneroMnemonicGenerator, MoneroMnemonicValidator, MoneroSeedGenerator, MoneroWordsNum, ) TEST_VECT = [ ...
test["exception"])
self.assertRaises
complex_expr
tests/monero/mnemonic/test_monero_mnemonic.py
test_invalid_mnemonic
MoneroMnemonicTests
363
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import SS58ChecksumError, SS58Decoder, SS58Encoder from bip_utils.ss58.ss58 import SS58Const TEST_VECT = [ { "raw": b"facc4de5b7745215ec8255c743f044d2a94ef72b2fb6d8e22c35ffbc3ac8ac9e", "ss58_format": 0, "encode": "16fqfQjHSWMoMxydLYoYixYcTGvcE...
(ss58_format, binascii.hexlify(dec)))
self.assertEqual
collection
tests/ss58/test_ss58.py
test_decoder
SS58Tests
100
null
ebellocchia/bip_utils
from bip_utils import Bip44Coins, Bip49Coins, Bip84, Bip84Coins, Bip86Coins, Cip1852Coins from tests.bip.bip44.test_bip44 import TEST_SEED from tests.bip.bip44_base.test_bip44_base import Bip44BaseTests TEST_VECT = [ # Bitcoin { "coin": Bip84Coins.BITCOIN, "names": ("Bitcoin", "BTC"), "...
"BIP-0084")
self.assertEqual
string_literal
tests/bip/bip84/test_bip84.py
test_spec_name
Bip84Tests
223
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( Substrate, SubstrateCoins, SubstratePath, SubstratePathElem, SubstratePathError, SubstratePathParser, ) from tests.substrate.test_substrate import TEST_SEED TEST_VECT_PATH_ELEM = [ { "elem": "//hard", "is_hard": True, ...
str(elem))
self.assertEqual
func_call
tests/substrate/test_substrate_path.py
__test_path
SubstratePathTests
236
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( Bip39EntropyBitLen, Bip39EntropyGenerator, Bip39Languages, Bip39MnemonicDecoder, Bip39MnemonicGenerator, Bip39MnemonicValidator, Bip39SeedGenerator, Bip39WordsNum, MnemonicChecksumError, ) TEST_VECT = [ # # Basic 12-wo...
test_bit_len // 8)
self.assertEqual
complex_expr
tests/bip/bip39/test_bip39.py
test_entropy_valid_bitlen
Bip39Tests
398
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( Substrate, SubstrateCoins, SubstratePath, SubstratePathElem, SubstratePathError, SubstratePathParser, ) from tests.substrate.test_substrate import TEST_SEED TEST_VECT_PATH_ELEM = [ { "elem": "//hard", "is_hard": True, ...
elem)
self.assertEqual
variable
tests/substrate/test_substrate_path.py
__test_path
SubstratePathTests
242
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( Bip32KeyIndex, Bip32Path, Bip32PathError, Bip32PathParser, Bip32Slip10Ed25519, Bip32Slip10Ed25519Blake2b, Bip32Slip10Nist256p1, Bip32Slip10Secp256k1, ) TEST_VECT_PATH = [ { "path": "", "parsed": [], "is...
elem.ToInt())
self.assertEqual
func_call
tests/bip/bip32/test_bip32_path.py
__test_path
Bip32PathTests
236
null
ebellocchia/bip_utils
from bip_utils import OneAddr, OneAddrDecoder, OneAddrEncoder from tests.addr.test_addr_base import AddrBaseTests from tests.addr.test_addr_const import TEST_SECP256K1_ADDR_INVALID_KEY_TYPES from tests.ecc.test_ecc import TEST_VECT_SECP256K1_PUB_KEY_INVALID, Secp256k1PublicKey TEST_VECT = [ { "pub_key": b"...
OneAddr is OneAddrEncoder)
self.assertTrue
complex_expr
tests/addr/test_one_addr.py
test_old_addr_cls
OneAddrTests
105
null
ebellocchia/bip_utils
from bip_utils import ( Bip32ChainCode, Bip32Depth, Bip32FingerPrint, Bip32KeyData, Bip32KeyError, Bip32KeyIndex, Bip32PrivateKey, Bip32PublicKey, ) from bip_utils.bip.bip32.bip32_const import Bip32Const from tests.ecc.test_ecc import * TEST_PUB_KEYS = [ { "key": TEST_ED2551...
pub_key.KeyIdentifier())
self.assertEqual
func_call
tests/bip/bip32/test_bip32_keys.py
__test_pub_key_obj
Bip32KeyDataTests
294
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import Bip38PubKeyModes, Secp256k1PublicKey from bip_utils.bip.bip38.bip38_addr import Bip38Addr TEST_VECT = [ { "pub_key_mode": Bip38PubKeyModes.COMPRESSED, "pub_key": b"03aaeb52dd7494c361049de67cc680e83ebcbbbdbeb13637d92cd845f70308af5e", "ad...
binascii.hexlify(address_hash))
self.assertEqual
func_call
tests/bip/bip38/test_bip38_addr.py
test_vector
Bip38AddrTests
63
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( AlgorandEntropyBitLen, AlgorandEntropyGenerator, AlgorandLanguages, AlgorandMnemonicDecoder, AlgorandMnemonicGenerator, AlgorandMnemonicValidator, AlgorandSeedGenerator, AlgorandWordsNum, Bip44, Bip44Coins, MnemonicChec...
mnemonic.WordsCount())
self.assertEqual
func_call
tests/algorand/mnemonic/test_algorand_mnemonic.py
test_vector
AlgorandMnemonicTests
147
null
ebellocchia/bip_utils
from bip_utils import EthAddr, EthAddrDecoder, EthAddrEncoder from tests.addr.test_addr_base import AddrBaseTests from tests.addr.test_addr_const import TEST_SECP256K1_ADDR_INVALID_KEY_TYPES from tests.ecc.test_ecc import TEST_VECT_SECP256K1_PUB_KEY_INVALID, Secp256k1PublicKey TEST_VECT = [ { "pub_key": b"...
EthAddr is EthAddrEncoder)
self.assertTrue
complex_expr
tests/addr/test_eth_addr.py
test_old_addr_cls
EthAddrTests
105
null
ebellocchia/bip_utils
import unittest from bip_utils import ( Bip32PathParser, Bip32Slip10Secp256k1, Bip39SeedGenerator, Slip32KeyDeserializer, Slip32PrivateKeySerializer, Slip32PublicKeySerializer, ) TEST_VECT = [ { "path": "m", "ex_pub": "xpub1qpujxsyd4hfu0dtwa524vac84e09mjsgnh5h9crl8wrqg58z5w...
ex_priv)
self.assertEqual
variable
tests/slip/slip32/test_slip32.py
__test_ex_priv
Slip32Tests
150
null
ebellocchia/bip_utils
import unittest from bip_utils import SplToken from bip_utils.solana.spl_token import SplTokenConst TEST_VECT = [ { "wallet_address": "E4m7DpaYjLp8Cw4oJbUYXEouXsb9KdX9WsMyPiDnqiV3", "token_mint_address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "pda": "Cvfrz4PaK1bm7NCVX8ekRe9fK8fMKK...
pda)
self.assertEqual
variable
tests/solana/test_spl_token.py
test_associated_token_address
SplTokenTests
66
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( Bip44, Bip44Changes, Bip44Coins, CardanoShelley, CardanoShelleyPrivateKeys, CardanoShelleyPublicKeys, Cip1852, Cip1852Coins, ) TEST_VECT = [ { "coin": Cip1852Coins.CARDANO_ICARUS, "ex_acc": "xprv3ST19gxjCZJ9V1B...
shelley_acc_ctx.IsPublicOnly())
self.assertFalse
func_call
tests/cardano/shelley/test_cardano_shelley.py
test_vector
CardanoShelleyTests
128
null
ebellocchia/bip_utils
from bip_utils import ( Bip32ChainCode, Bip32Depth, Bip32FingerPrint, Bip32KeyData, Bip32KeyError, Bip32KeyIndex, Bip32PrivateKey, Bip32PublicKey, ) from bip_utils.bip.bip32.bip32_const import Bip32Const from tests.ecc.test_ecc import * TEST_PUB_KEYS = [ { "key": TEST_ED2551...
priv_key.ToExtended())
self.assertEqual
func_call
tests/bip/bip32/test_bip32_keys.py
__test_priv_key_obj
Bip32KeyDataTests
269
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( Bip32ChainCode, Bip32Depth, Bip32FingerPrint, Bip32KeyData, Bip32KeyError, Bip32KeyIndex, Bip32KeyNetVersions, Bip32PrivateKey, Bip32PublicKey, EllipticCurveGetter, ) from bip_utils.bip.bip32.bip32_key_data import Bip32KeyD...
bip32_obj.Depth())
self.assertEqual
func_call
tests/bip/bip32/test_bip32_base.py
__test_bip32_obj
Bip32BaseTests
307
null
ebellocchia/bip_utils
from bip_utils import IcxAddr, IcxAddrDecoder, IcxAddrEncoder from tests.addr.test_addr_base import AddrBaseTests from tests.addr.test_addr_const import TEST_SECP256K1_ADDR_INVALID_KEY_TYPES from tests.ecc.test_ecc import TEST_VECT_SECP256K1_PUB_KEY_INVALID, Secp256k1PublicKey TEST_VECT = [ { "pub_key": b"...
IcxAddr is IcxAddrEncoder)
self.assertTrue
complex_expr
tests/addr/test_icx_addr.py
test_old_addr_cls
IcxAddrTests
99
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( Bip32PrivateKey, Bip32PublicKey, CardanoShelleyPrivateKeys, CardanoShelleyPublicKeys, Cip1852Conf, EllipticCurveTypes, ) from bip_utils.bip.bip32.bip32_const import Bip32Const from tests.bip.bip32.test_bip32_keys import TEST_BIP32_KEY_DATA...
shelley_key.ToAddress())
self.assertEqual
func_call
tests/cardano/shelley/test_cardano_shelley_keys.py
__test_pub_key
CardanoShelleyKeysTests
116
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import Bech32ChecksumError, SegwitBech32Decoder, SegwitBech32Encoder TEST_VECT = [ { "raw": b"751e76e8199196d454941c45d1b3a323f1433bd6", "encode": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4", }, { "raw": b"30ea99599334801bf09d753af38b...
test["ex"])
self.assertRaises
complex_expr
tests/bech32/test_segwit_bech32.py
test_invalid_addr
SegwitBech32Tests
242
null
ebellocchia/bip_utils
from bip_utils import TonAddr, TonAddrEncoder, TonAddrVersions from tests.addr.test_addr_base import AddrBaseTests from tests.addr.test_addr_const import TEST_ED25519_ADDR_INVALID_KEY_TYPES from tests.ecc.test_ecc import TEST_VECT_ED25519_PUB_KEY_INVALID, Ed25519PublicKey TEST_VECT = [ { "pub_key": b"00c6b...
TonAddr is TonAddrEncoder)
self.assertTrue
complex_expr
tests/addr/test_ton_addr.py
test_old_addr_cls
TonAddrTests
102
null
ebellocchia/bip_utils
import unittest from bip_utils import ( Bip32PathParser, Bip32Slip10Secp256k1, Bip39SeedGenerator, Slip32KeyDeserializer, Slip32PrivateKeySerializer, Slip32PublicKeySerializer, ) TEST_VECT = [ { "path": "m", "ex_pub": "xpub1qpujxsyd4hfu0dtwa524vac84e09mjsgnh5h9crl8wrqg58z5w...
deser_key.Path().ToStr())
self.assertEqual
func_call
tests/slip/slip32/test_slip32.py
__test_ex_pub
Slip32Tests
140
null
ebellocchia/bip_utils
import os import random import unittest from bip_utils import Bip32ChainCode, Bip32Depth, Bip32FingerPrint, Bip32KeyData, Bip32KeyIndex from bip_utils.bip.bip32.bip32_key_data import Bip32KeyDataConst class Bip32KeyDataTests(unittest.TestCase): def test_operators(self): self.assertTrue(Bip32Depth(1) < B...
Bip32Depth(1) == 1)
self.assertTrue
func_call
tests/bip/bip32/test_bip32_key_data.py
test_operators
Bip32KeyDataTests
101
null
ebellocchia/bip_utils
import binascii import math import unittest from bip_utils import ( BytesUtils, ElectrumV2EntropyBitLen, ElectrumV2EntropyGenerator, ElectrumV2Languages, ElectrumV2MnemonicDecoder, ElectrumV2MnemonicGenerator, ElectrumV2MnemonicTypes, ElectrumV2MnemonicValidator, ElectrumV2SeedGener...
TypeError)
self.assertRaises
variable
tests/electrum/mnemonic/test_electrum_v2_mnemonic.py
test_invalid_params
ElectrumV2MnemonicTests
266
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( Bip32ChainCode, Bip32Depth, Bip32FingerPrint, Bip32KeyData, Bip32KeyError, Bip32KeyIndex, Bip32KeyNetVersions, Bip32PrivateKey, Bip32PublicKey, EllipticCurveGetter, ) from bip_utils.bip.bip32.bip32_key_data import Bip32KeyD...
bip32_obj.IsPublicOnly())
self.assertEqual
func_call
tests/bip/bip32/test_bip32_base.py
__test_bip32_obj
Bip32BaseTests
306
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( Bip32KeyData, Bip32KeyError, Bip44Changes, Bip44Coins, Bip44DepthError, Bip44Levels, Bip44PrivateKey, Bip44PublicKey, Bip49Coins, CardanoShelley, Cip1852Coins, Monero, ) from bip_utils.bip.bip32.bip32_key_data impor...
addr)
self.assertEqual
variable
tests/bip/bip44_base/test_bip44_base.py
_test_from_seed
Bip44BaseTests
101
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import Bech32ChecksumError, SegwitBech32Decoder, SegwitBech32Encoder TEST_VECT = [ { "raw": b"751e76e8199196d454941c45d1b3a323f1433bd6", "encode": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4", }, { "raw": b"30ea99599334801bf09d753af38b...
enc)
self.assertEqual
variable
tests/bech32/test_segwit_bech32.py
test_encoder
SegwitBech32Tests
237
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import DataBytes TEST_VECT = [ { "bytes": b"1234", "hex": "1234", "int_big": 4660, "int_little": 13330, }, { "bytes": b"001234", "hex": "001234", "int_big": 4660, "int_little": 3412480, }, ...
TypeError)
self.assertRaises
variable
tests/utils/test_data_bytes.py
test_invalid_parameters
DataBytesTests
90
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( AlgorandEntropyBitLen, AlgorandEntropyGenerator, AlgorandLanguages, AlgorandMnemonicDecoder, AlgorandMnemonicGenerator, AlgorandMnemonicValidator, AlgorandSeedGenerator, AlgorandWordsNum, Bip44, Bip44Coins, MnemonicChec...
test["exception"])
self.assertRaises
complex_expr
tests/algorand/mnemonic/test_algorand_mnemonic.py
test_invalid_mnemonic
AlgorandMnemonicTests
216
null
ebellocchia/bip_utils
import unittest from bip_utils import ( Bip32PrivateKey, Bip32PublicKey, Bip44Conf, Bip44PrivateKey, Bip44PublicKey, Cip1852Coins, Cip1852ConfGetter, DataBytes, ) from bip_utils.bip.bip32.bip32_const import Bip32Const from tests.bip.bip32.test_bip32_keys import TEST_BIP32_KEY_DATA from ...
bip32_key.ToExtended())
self.assertEqual
func_call
tests/bip/bip44_base/test_bip44_keys.py
__test_priv_key_obj
Bip44KeyDataTests
177
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import SS58ChecksumError, SS58Decoder, SS58Encoder from bip_utils.ss58.ss58 import SS58Const TEST_VECT = [ { "raw": b"facc4de5b7745215ec8255c743f044d2a94ef72b2fb6d8e22c35ffbc3ac8ac9e", "ss58_format": 0, "encode": "16fqfQjHSWMoMxydLYoYixYcTGvcE...
test["ex"])
self.assertRaises
complex_expr
tests/ss58/test_ss58.py
test_invalid_decode
SS58Tests
123
null
ebellocchia/bip_utils
import unittest from bip_utils import ( Bip32PrivateKey, Bip32PublicKey, Bip44Conf, Bip44PrivateKey, Bip44PublicKey, Cip1852Coins, Cip1852ConfGetter, DataBytes, ) from bip_utils.bip.bip32.bip32_const import Bip32Const from tests.bip.bip32.test_bip32_keys import TEST_BIP32_KEY_DATA from ...
bip32_key.Data().ChainCode())
self.assertEqual
func_call
tests/bip/bip44_base/test_bip44_keys.py
__test_priv_key_obj
Bip44KeyDataTests
175
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( Substrate, SubstrateCoins, SubstratePath, SubstratePathElem, SubstratePathError, SubstratePathParser, ) from tests.substrate.test_substrate import TEST_SEED TEST_VECT_PATH_ELEM = [ { "elem": "//hard", "is_hard": True, ...
path.ToList())
self.assertEqual
func_call
tests/substrate/test_substrate_path.py
test_add_elem
SubstratePathTests
200
null
ebellocchia/bip_utils
from bip_utils import ( Bip32ChainCode, Bip32Depth, Bip32FingerPrint, Bip32KeyData, Bip32KeyError, Bip32KeyIndex, Bip32PrivateKey, Bip32PublicKey, ) from bip_utils.bip.bip32.bip32_const import Bip32Const from tests.ecc.test_ecc import * TEST_PUB_KEYS = [ { "key": TEST_ED2551...
pub_key.FingerPrint().ToBytes())
self.assertEqual
func_call
tests/bip/bip32/test_bip32_keys.py
__test_pub_key_obj
Bip32KeyDataTests
293
null
ebellocchia/bip_utils
from bip_utils import NimAddr, NimAddrDecoder, NimAddrEncoder from tests.addr.test_addr_base import AddrBaseTests from tests.addr.test_addr_const import TEST_ED25519_ADDR_INVALID_KEY_TYPES from tests.ecc.test_ecc import TEST_VECT_ED25519_PUB_KEY_INVALID, Ed25519PublicKey TEST_VECT = [ { "pub_key": b"003ca0...
NimAddr is NimAddrEncoder)
self.assertTrue
complex_expr
tests/addr/test_nim_addr.py
test_old_addr_cls
NimAddrTests
103
null
ebellocchia/bip_utils
import os import random import unittest from bip_utils import Bip32ChainCode, Bip32Depth, Bip32FingerPrint, Bip32KeyData, Bip32KeyIndex from bip_utils.bip.bip32.bip32_key_data import Bip32KeyDataConst class Bip32KeyDataTests(unittest.TestCase): def test_invalid_parameters(self): # Bip32Depth se...
ValueError)
self.assertRaises
variable
tests/bip/bip32/test_bip32_key_data.py
test_invalid_parameters
Bip32KeyDataTests
108
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import CardanoByronLegacySeedGenerator, CardanoIcarusSeedGenerator TEST_VECT = [ # # Basic 12-words # { "mnemonic": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about", "seed_byron_old": b"dfee64...
TypeError)
self.assertRaises
variable
tests/cardano/mnemonic/test_cardano_mnemonic.py
test_invalid_params
CardanoMnemonicTests
126
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( Ton, TonAddrVersions, TonMnemonicGenerator, TonSeedGenerator, TonPrivateKey, TonPublicKey, ) TEST_VECT = [ { "mnemonic": "flash garden eagle south occur hair believe pigeon shell later awake evoke club bundle humble just alarm...
ton.PrivateKey().Raw().ToHex())
self.assertEqual
func_call
tests/ton/test_ton.py
test_vector
TonTests
88
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( AlgorandEntropyBitLen, AlgorandEntropyGenerator, AlgorandLanguages, AlgorandMnemonicDecoder, AlgorandMnemonicGenerator, AlgorandMnemonicValidator, AlgorandSeedGenerator, AlgorandWordsNum, Bip44, Bip44Coins, MnemonicChec...
str(mnemonic))
self.assertEqual
func_call
tests/algorand/mnemonic/test_algorand_mnemonic.py
test_vector
AlgorandMnemonicTests
145
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import Bech32Decoder, Bech32Encoder TEST_VECT = [ { "raw": b"751e76e8199196d454941c45d1b3a323f1433bd6", "encode": "cosmos1w508d6qejxtdg4y5r3zarvary0c5xw7k6ah60c", }, { "raw": b"30ea99599334801bf09d753af38ba546800bea8b", "encode...
test["raw"])
self.assertEqual
complex_expr
tests/bech32/test_bech32.py
test_decoder
Bech32Tests
69
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( Bip32ChainCode, Bip32Depth, Bip32FingerPrint, Bip32KeyData, Bip32KeyError, Bip32KeyIndex, Bip32KeyNetVersions, Bip32PrivateKey, Bip32PublicKey, EllipticCurveGetter, ) from bip_utils.bip.bip32.bip32_key_data import Bip32KeyD...
bip32_ctx.Index())
self.assertEqual
func_call
tests/bip/bip32/test_bip32_base.py
__test_from_priv_key
Bip32BaseTests
183
null
ebellocchia/bip_utils
import binascii import math import unittest from bip_utils import ( BytesUtils, ElectrumV2EntropyBitLen, ElectrumV2EntropyGenerator, ElectrumV2Languages, ElectrumV2MnemonicDecoder, ElectrumV2MnemonicGenerator, ElectrumV2MnemonicTypes, ElectrumV2MnemonicValidator, ElectrumV2SeedGener...
mnemonic.WordsCount())
self.assertEqual
func_call
tests/electrum/mnemonic/test_electrum_v2_mnemonic.py
test_vector
ElectrumV2MnemonicTests
177
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( TonLanguages, TonMnemonic, TonMnemonicGenerator, TonMnemonicValidator, TonSeedGenerator, TonSeedTypes, TonWordsNum, ) TEST_VECT = [ { "mnemonic": "ask fossil tragic dune session prize own bundle element shift pony trouble ...
mnemonic.WordsCount())
self.assertEqual
func_call
tests/ton/mnemonic/test_ton_mnemonic.py
test_generator
TonMnemonicTests
124
null
ebellocchia/bip_utils
import unittest from bip_utils import Bip32KeyIndex, Bip32Utils class Bip32UtilsTests(unittest.TestCase): def test_basic(self): self.assertEqual(Bip32Utils.HardenIndex(1),
Bip32KeyIndex.HardenIndex(1))
self.assertEqual
func_call
tests/bip/bip32/test_bip32_utils.py
test_basic
Bip32UtilsTests
33
null
ebellocchia/bip_utils
import binascii import math import unittest from bip_utils import ( BytesUtils, ElectrumV2EntropyBitLen, ElectrumV2EntropyGenerator, ElectrumV2Languages, ElectrumV2MnemonicDecoder, ElectrumV2MnemonicGenerator, ElectrumV2MnemonicTypes, ElectrumV2MnemonicValidator, ElectrumV2SeedGener...
mnemonic.ToList())
self.assertEqual
func_call
tests/electrum/mnemonic/test_electrum_v2_mnemonic.py
test_vector
ElectrumV2MnemonicTests
176
null
ebellocchia/bip_utils
import binascii import unittest class AddrBaseTests(unittest.TestCase): def _test_encode_key(self, addr_enc_class, pub_key_class, test_vector): for test in test_vector: key_bytes = binascii.unhexlify(test["pub_key"]) # Test with bytes and public key object self.assertE...
TypeError)
self.assertRaises
variable
tests/addr/test_addr_base.py
_test_invalid_keys
AddrBaseTests
57
null
ebellocchia/bip_utils
from bip_utils import CoinsConf, P2TRAddr, P2TRAddrDecoder, P2TRAddrEncoder from tests.addr.test_addr_base import AddrBaseTests from tests.addr.test_addr_const import TEST_SECP256K1_ADDR_INVALID_KEY_TYPES from tests.ecc.test_ecc import TEST_VECT_SECP256K1_PUB_KEY_INVALID, Secp256k1PublicKey TEST_VECT = [ # # M...
P2TRAddr is P2TRAddrEncoder)
self.assertTrue
complex_expr
tests/addr/test_P2TR.py
test_old_addr_cls
P2TRTests
113
null
ebellocchia/bip_utils
import unittest from bip_utils import ( Bip32PathParser, Bip32Slip10Secp256k1, Bip39SeedGenerator, Slip32KeyDeserializer, Slip32PrivateKeySerializer, Slip32PublicKeySerializer, ) TEST_VECT = [ { "path": "m", "ex_pub": "xpub1qpujxsyd4hfu0dtwa524vac84e09mjsgnh5h9crl8wrqg58z5w...
deser_key.KeyBytes())
self.assertEqual
func_call
tests/slip/slip32/test_slip32.py
__test_ex_pub
Slip32Tests
139
null
ebellocchia/bip_utils
import binascii import unittest from bip_utils import ( TonLanguages, TonMnemonic, TonMnemonicGenerator, TonMnemonicValidator, TonSeedGenerator, TonSeedTypes, TonWordsNum, ) TEST_VECT = [ { "mnemonic": "ask fossil tragic dune session prize own bundle element shift pony trouble ...
TypeError)
self.assertRaises
variable
tests/ton/mnemonic/test_ton_mnemonic.py
test_invalid_params
TonMnemonicTests
151
null
benavlabs/fastcrud
import pytest from sqlalchemy import Column, Integer, String, ForeignKey, text from sqlalchemy.orm import DeclarativeBase from fastcrud import FastCRUD, CountConfig from ...sqlalchemy.conftest import ( Project, Participant, ProjectsParticipantsAssociation, Author, Article, ) @pytest.mark.asyncio as...
2
assert
numeric_literal
tests/sqlalchemy/crud/test_count_config.py
test_count_config_simple_many_to_many
96
null
benavlabs/fastcrud
import pytest from fastcrud import FastCRUD, JoinConfig from pydantic import BaseModel from sqlalchemy import Column, Integer, String, ForeignKey from sqlalchemy.orm import relationship from ...sqlalchemy.conftest import Base @pytest.mark.asyncio async def test_composite_pk_deduplication_bug_scenario_1(async_session)...
2
assert
numeric_literal
tests/sqlalchemy/crud/test_composite_pk_deduplication_bug.py
test_composite_pk_deduplication_bug_scenario_1
140
null
benavlabs/fastcrud
from sqlalchemy import Select from fastcrud.core.filtering import FilterProcessor from fastcrud.core.query import SQLQueryBuilder from tests.sqlalchemy.conftest import ModelTest class TestQueryIntegration: def test_empty_filters_with_query_building(self): """Test query building with no filters""" ...
0
assert
numeric_literal
tests/sqlalchemy/core/test_query_integration.py
test_empty_filters_with_query_building
TestQueryIntegration
75
null
benavlabs/fastcrud
import pytest from fastcrud import FastCRUD, JoinConfig from tests.sqlalchemy.conftest import ( Project, Participant, ProjectsParticipantsAssociation, ) @pytest.mark.asyncio async def test_many_to_many_nested_aggregates_and_counts_by_base(async_session): # Create base projects project1 = Project(id...
1
assert
numeric_literal
tests/sqlalchemy/crud/test_many_to_many_nested.py
test_many_to_many_nested_aggregates_and_counts_by_base
75
null
benavlabs/fastcrud
from typing import Annotated import pytest from fastcrud import FastCRUD, JoinConfig, aliased from pydantic import BaseModel, Field from sqlalchemy.ext.asyncio import AsyncSession from ...sqlalchemy.conftest import ( ModelTest, TierModel, CreateSchemaTest, TierSchemaTest, ReadSchemaTest, Categor...
3
assert
numeric_literal
tests/sqlalchemy/crud/test_get_multi_joined.py
test_many_to_many_joined
573
null
benavlabs/fastcrud
import pytest from fastapi.testclient import TestClient from sqlalchemy import select @pytest.mark.asyncio async def test_update_item(client: TestClient, async_session, test_model, test_data): for data in test_data: new_item = test_model(**data) async_session.add(new_item) await async_session.c...
updated_data["name"]
assert
complex_expr
tests/sqlmodel/endpoint/test_update_item.py
test_update_item
25
null
benavlabs/fastcrud
import pytest from fastapi.testclient import TestClient from fastcrud import crud_router @pytest.mark.asyncio async def test_endpoint_custom_names( client: TestClient, test_data, async_session, test_model, create_schema, update_schema, read_schema, ): for item in test_data: asy...
item_id
assert
variable
tests/sqlmodel/endpoint/test_endpoint_custom_names.py
test_endpoint_custom_names
52
null
benavlabs/fastcrud
from sqlalchemy import Select from fastcrud.core.filtering import FilterProcessor from fastcrud.core.query import SQLQueryBuilder from tests.sqlalchemy.conftest import ModelTest class TestQueryIntegration: def test_filter_and_query_integration(self): """Test complete integration of filtering and query bu...
3
assert
numeric_literal
tests/sqlalchemy/core/test_query_integration.py
test_filter_and_query_integration
TestQueryIntegration
36
null
benavlabs/fastcrud
import pytest from sqlalchemy import select from fastcrud.crud.fast_crud import FastCRUD from pydantic import ValidationError @pytest.mark.asyncio async def test_create_no_commit_read( async_session, test_model, create_schema, read_schema ): crud = FastCRUD(test_model) new_data = create_schema(name="No Com...
2
assert
numeric_literal
tests/sqlalchemy/crud/test_create.py
test_create_no_commit_read
96
null
benavlabs/fastcrud
import pytest from unittest.mock import patch from fastcrud.crud.fast_crud import FastCRUD from fastcrud import JoinConfig from ..conftest import Project, Participant, ProjectsParticipantsAssociation @pytest.mark.asyncio async def test_count_with_advanced_filters(async_session, test_model, test_data): for item in ...
len(test_data) - 1
assert
func_call
tests/sqlalchemy/crud/test_count.py
test_count_with_advanced_filters
57
null
benavlabs/fastcrud
import pytest from sqlalchemy import select from fastcrud.crud.fast_crud import FastCRUD from pydantic import ValidationError @pytest.mark.asyncio async def test_create_successful(async_session, test_model, create_schema): crud = FastCRUD(test_model) new_data = create_schema(name="New Record", tier_id=1) r...
1
assert
numeric_literal
tests/sqlalchemy/crud/test_create.py
test_create_successful
22
null
benavlabs/fastcrud
from typing import Optional import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel from fastcrud import FastCRUD, crud_router from fastcrud.endpoint.endpoint_creator import EndpointCreator from fastcrud.core import JoinConfig from ..conftest import ( Mod...
5
assert
numeric_literal
tests/sqlalchemy/endpoint/test_include_relationships.py
test_read_multi_with_relationships_and_pagination
190
null
benavlabs/fastcrud
import pytest from sqlalchemy.sql.elements import ColumnElement from fastcrud.core.filtering import FilterProcessor from tests.sqlmodel.conftest import ModelTest, TierModel class TestFilterProcessor: def test_simple_equality_filter(self): """Test simple equality filters: field=value""" processor ...
1
assert
numeric_literal
tests/sqlmodel/core/test_filter_processor.py
test_simple_equality_filter
TestFilterProcessor
23
null
benavlabs/fastcrud
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from fastcrud import EndpointCreator, FilterConfig from tests.sqlalchemy.conftest import ( Company, UserModel, CompanySchema, UserModelSchema, ) async def setup_test_data(async_session): """Set up test data for joi...
data
assert
variable
tests/sqlalchemy/endpoint/test_joined_model_filters.py
test_filter_users_by_company_name
119
null
benavlabs/fastcrud
import pytest from sqlalchemy import Column, Integer, String, ForeignKey, text from sqlalchemy.orm import DeclarativeBase from fastcrud import FastCRUD, CountConfig from ...sqlalchemy.conftest import ( Project, Participant, ProjectsParticipantsAssociation, Author, Article, ) @pytest.mark.asyncio as...
3
assert
numeric_literal
tests/sqlalchemy/crud/test_count_config.py
test_count_config_simple_many_to_many
89
null
benavlabs/fastcrud
import pytest from fastcrud.crud.fast_crud import FastCRUD from ...sqlalchemy.conftest import ModelTest, ReadSchemaTest @pytest.mark.asyncio async def test_get_multi_by_cursor_descending_order(async_session, test_data): for item in test_data: async_session.add(ModelTest(**item)) await async_session.com...
2
assert
numeric_literal
tests/sqlalchemy/crud/test_get_multi_by_cursor.py
test_get_multi_by_cursor_descending_order
188
null
benavlabs/fastcrud
import pytest from fastcrud.core import FilterConfig def test_filter_config_get_params(): filter_config = FilterConfig(filters={"string": "value", "int": 42}) params = filter_config.get_params() assert params["string"].default ==
"value"
assert
string_literal
tests/sqlalchemy/core/test_filter_config.py
test_filter_config_get_params
34
null
benavlabs/fastcrud
import pytest from pydantic import ValidationError from fastcrud.core import CRUDMethods def test_crud_methods_with_valid_methods(): crud_methods = CRUDMethods(valid_methods=["create", "read"]) assert crud_methods.valid_methods ==
["create", "read"]
assert
collection
tests/sqlmodel/core/test_valid_methods.py
test_crud_methods_with_valid_methods
16
null
benavlabs/fastcrud
import pytest from fastapi.testclient import TestClient from sqlalchemy import select @pytest.mark.asyncio async def test_read_item_success( client: TestClient, async_session, test_model, test_data ): tester_data = {"name": test_data[0]["name"], "tier_id": test_data[0]["tier_id"]} new_item = test_model(**t...
tester_data["name"]
assert
complex_expr
tests/sqlalchemy/endpoint/test_get_item.py
test_read_item_success
20
null
benavlabs/fastcrud
from typing import Annotated import pytest from fastcrud import FastCRUD, JoinConfig, aliased from pydantic import BaseModel, Field from sqlalchemy.ext.asyncio import AsyncSession from ...sqlalchemy.conftest import ( ModelTest, TierModel, CreateSchemaTest, TierSchemaTest, ReadSchemaTest, Categor...
1
assert
numeric_literal
tests/sqlalchemy/crud/test_get_multi_joined.py
test_get_multi_joined_with_aliases
425
null
benavlabs/fastcrud
from fastapi.testclient import TestClient from fastcrud import EndpointCreator async def custom_endpoint(foo: str): return {"foo": f"{foo}"} def test_add_custom_route_include_in_schema_false( client: TestClient, endpoint_creator: EndpointCreator ): endpoint_creator.add_custom_route( endpoint=custo...
{"foo": "hidden"}
assert
collection
tests/sqlalchemy/endpoint/test_custom_route.py
test_add_custom_route_include_in_schema_false
46
null
benavlabs/fastcrud
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from fastcrud import EndpointCreator from fastcrud.core import FilterConfig from tests.sqlalchemy.conftest import ModelTest, CreateSchemaTest, UpdateSchemaTest def app(async_session) -> FastAPI: app = FastAPI() endpoint_creato...
names[i + 1]
assert
complex_expr
tests/sqlalchemy/endpoint/test_endpoint_sorting.py
test_get_multi_with_multiple_sort_fields
97
null
benavlabs/fastcrud
import pytest from sqlalchemy import select from fastcrud.crud.fast_crud import FastCRUD from pydantic import ValidationError @pytest.mark.asyncio async def test_create_successful(async_session, test_model, create_schema): crud = FastCRUD(test_model) new_data = create_schema(name="New Record", tier_id=1) r...
None
assert
none_literal
tests/sqlalchemy/crud/test_create.py
test_create_successful
14
null
benavlabs/fastcrud
import pytest from fastapi.testclient import TestClient from sqlalchemy import select @pytest.mark.asyncio async def test_update_item(client: TestClient, async_session, test_model, test_data): for data in test_data: new_item = test_model(**data) async_session.add(new_item) await async_session.c...
updated_data["name"]
assert
complex_expr
tests/sqlalchemy/endpoint/test_update_item.py
test_update_item
25
null
benavlabs/fastcrud
from typing import Annotated import pytest from fastcrud import FastCRUD, JoinConfig, aliased from pydantic import BaseModel, Field from sqlalchemy.ext.asyncio import AsyncSession from ...sqlalchemy.conftest import ( ModelTest, TierModel, CreateSchemaTest, TierSchemaTest, ReadSchemaTest, Categor...
0
assert
numeric_literal
tests/sqlalchemy/crud/test_get_multi_joined.py
test_get_multi_joined_no_results
228
null
benavlabs/fastcrud
import pytest from fastapi.testclient import TestClient from sqlalchemy import select @pytest.mark.asyncio async def test_read_multi_primary_key_item_success( client: TestClient, async_session, multi_pk_model, test_data_multipk ): tester_data = test_data_multipk new_item = multi_pk_model(**tester_data) ...
tester_data["uuid"]
assert
complex_expr
tests/sqlalchemy/endpoint/test_get_item.py
test_read_multi_primary_key_item_success
40
null
benavlabs/fastcrud
import pytest from fastcrud import FastCRUD, JoinConfig from tests.sqlalchemy.conftest import ( ModelTest, TierModel, CreateSchemaTest, TierSchemaTest, ) @pytest.mark.asyncio async def test_get_multi_joined_total_count_with_join_model( async_session, test_data, test_data_tier ): """Test that to...
len(test_data)
assert
func_call
tests/sqlalchemy/crud/test_get_multi_joined_total_count.py
test_get_multi_joined_total_count_with_join_model
56
null
benavlabs/fastcrud
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from fastcrud import EndpointCreator from fastcrud.core import FilterConfig from tests.sqlalchemy.conftest import ModelTest, CreateSchemaTest, UpdateSchemaTest def app(async_session) -> FastAPI: app = FastAPI() endpoint_creato...
len(sorted_data)
assert
func_call
tests/sqlalchemy/endpoint/test_endpoint_sorting.py
test_get_multi_with_sort_ascending
46
null
benavlabs/fastcrud
import pytest from pydantic import BaseModel from fastcrud import FastCRUD, JoinConfig from ..conftest import ( Article, Author, ) @pytest.mark.asyncio async def test_nested_limit_empty_parent_ids(async_session): """Test that empty parent results return empty nested data.""" # Create only an author wi...
[]
assert
collection
tests/sqlalchemy/crud/test_nested_limit.py
test_nested_limit_empty_parent_ids
422
null
benavlabs/fastcrud
from fastapi.testclient import TestClient from fastcrud import EndpointCreator async def custom_endpoint(foo: str): return {"foo": f"{foo}"} def test_add_custom_route(client: TestClient, endpoint_creator: EndpointCreator): endpoint_creator.add_custom_route( endpoint=custom_endpoint, path="/tes...
{"foo": "bar"}
assert
collection
tests/sqlmodel/endpoint/test_custom_route.py
test_add_custom_route
23
null
benavlabs/fastcrud
from fastapi.testclient import TestClient import pytest from sqlalchemy import select @pytest.mark.asyncio async def test_create_item(client: TestClient, async_session, test_model, test_data): tester_data = {"name": test_data[0]["name"], "tier_id": test_data[0]["tier_id"]} response = client.post("/test/create"...
test_data[0]["name"]
assert
complex_expr
tests/sqlalchemy/endpoint/test_create_item.py
test_create_item
19
null
benavlabs/fastcrud
import pytest from fastcrud.crud.fast_crud import FastCRUD from ...sqlalchemy.conftest import ModelTest, ReadSchemaTest @pytest.mark.asyncio async def test_get_multi_by_cursor_initial_fetch(async_session, test_data): for item in test_data: async_session.add(ModelTest(**item)) await async_session.commit...
5
assert
numeric_literal
tests/sqlalchemy/crud/test_get_multi_by_cursor.py
test_get_multi_by_cursor_initial_fetch
15
null
benavlabs/fastcrud
from sqlalchemy import Select from fastcrud.core.filtering import FilterProcessor from fastcrud.core.query import SQLQueryBuilder from tests.sqlalchemy.conftest import ModelTest class TestQueryIntegration: def test_complex_filter_query_chain(self): """Test complex filter scenarios with query building""" ...
2
assert
numeric_literal
tests/sqlalchemy/core/test_query_integration.py
test_complex_filter_query_chain
TestQueryIntegration
59
null
benavlabs/fastcrud
import pytest from typing import Annotated from fastapi import FastAPI, Depends from fastapi.testclient import TestClient from sqlalchemy.ext.asyncio import AsyncSession from fastcrud.core import PaginatedRequestQuery def custom_app(async_session) -> FastAPI: """Create a FastAPI app with custom endpoints using Pa...
2
assert
numeric_literal
tests/sqlalchemy/endpoint/test_paginated_request_query_reusability.py
test_custom_endpoint_with_pagination_params
79
null
benavlabs/fastcrud
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from fastcrud import crud_router def app_with_crud_router(async_session, test_model, create_schema, update_schema): """Create a FastAPI app with crud_router endpoints.""" app = FastAPI() router = crud_router( sess...
"endpoint"
assert
string_literal
tests/sqlalchemy/endpoint/test_endpoint_operation_ids.py
test_endpoint_operation_ids_not_generic_endpoint
95
null
benavlabs/fastcrud
import pytest from fastcrud import FastCRUD @pytest.mark.asyncio async def test_or_filter_with_multiple_like_values(async_session, test_model): """Test OR filter with multiple values for the same operator (like)""" # Create test data test_data = [ {"name": "Alice Johnson", "tier_id": 1, "category_i...
4
assert
numeric_literal
tests/sqlalchemy/crud/test_multiple_like_or.py
test_or_filter_with_multiple_like_values
29
null
benavlabs/fastcrud
from fastapi import Depends from fastcrud.core import FilterConfig async def get_auth_user(): return UserInfo(organization_id=123) async def get_org_id(auth: UserInfo = Depends(get_auth_user)): return auth.organization_id def test_filter_config_with_callable_value(): filter_config = FilterConfig( ...
get_org_id
assert
variable
tests/sqlalchemy/core/test_dependency_filter.py
test_filter_config_with_callable_value
27
null
benavlabs/fastcrud
import pytest from sqlalchemy import Column, Integer, String, ForeignKey, text from sqlalchemy.orm import DeclarativeBase from fastcrud import FastCRUD, CountConfig from ...sqlalchemy.conftest import ( Project, Participant, ProjectsParticipantsAssociation, Author, Article, ) @pytest.mark.asyncio as...
4
assert
numeric_literal
tests/sqlalchemy/crud/test_count_config.py
test_count_config_multiple_counts
192
null
benavlabs/fastcrud
from datetime import datetime, timezone import pytest from sqlalchemy import select from sqlalchemy.exc import MultipleResultsFound, NoResultFound from fastcrud.crud.fast_crud import FastCRUD from ...sqlalchemy.conftest import ModelTest, UpdateSchemaTest, ModelTestWithTimestamp @pytest.mark.asyncio async def test_up...
"UpdatedName"
assert
string_literal
tests/sqlalchemy/crud/test_update.py
test_update_auto_updates_updated_at
209
null
benavlabs/fastcrud
import pytest from uuid import UUID, uuid4 from sqlalchemy import Column, String from sqlalchemy.dialects.postgresql import UUID as PostgresUUID from sqlalchemy.types import TypeDecorator from fastapi import FastAPI from fastapi.testclient import TestClient from fastcrud import crud_router, FastCRUD from fastcrud imp...
result
assert
variable
tests/sqlalchemy/core/test_uuid.py
test_create_dynamic_filters_type_conversion
251
null
benavlabs/fastcrud
import pytest from fastcrud import FastCRUD @pytest.mark.asyncio async def test_multi_field_or_filter(async_session, test_model): # Create specific test data for multi-field OR filtering test_data = [ {"name": "Alice Johnson", "tier_id": 1, "category_id": 1}, {"name": "Bob Smith", "tier_id": 2...
2
assert
numeric_literal
tests/sqlalchemy/crud/test_multi_field_or_filter.py
test_multi_field_or_filter
28
null
benavlabs/fastcrud
import pytest from typing import Optional from pydantic import BaseModel, ConfigDict from fastcrud.crud.fast_crud import FastCRUD from ...sqlalchemy.conftest import ModelTest, TierModel def issue_199_test_data() -> list[dict]: """Test data specific to issue #199 reproduction.""" return [ {"id": 1, "nam...
stmt_str
assert
variable
tests/sqlalchemy/crud/test_relationship_fields.py
test_relationship_field_exclusion_prevents_cartesian_product
212
null
benavlabs/fastcrud
from fastapi.testclient import TestClient import pytest from sqlalchemy import select @pytest.mark.asyncio async def test_create_tier_duplicate_check(client: TestClient, async_session): test_tier_1 = {"name": "Premium"} response = client.post("/tier/create", json=test_tier_1) assert response.status_code ==...
response.text
assert
complex_expr
tests/sqlalchemy/endpoint/test_create_item.py
test_create_tier_duplicate_check
59
null
benavlabs/fastcrud
import pytest from pydantic import ValidationError from fastcrud.core import CRUDMethods def test_crud_methods_with_invalid_method(): with pytest.raises(ValidationError) as excinfo: CRUDMethods(valid_methods=["create", "invalid_method"]) assert "Invalid CRUD method: invalid_method" in
str(excinfo.value)
assert
func_call
tests/sqlmodel/core/test_valid_methods.py
test_crud_methods_with_invalid_method
11
null