<commit_before>"""Tests for registry module - nodes methods"""
import os
import vcr
from pygbif import registry

@vcr.use_cassette('test/vcr_cassettes/test_nodes.yaml')
def test_nodes():
    "Basic test of registry.nodes"
    res = registry.nodes()
    assert dict == res.__class__
    assert 2 == len(res)
    assert 100 == len(res['data'])
    assert ['data', 'meta'] == sorted(res.keys())

@vcr.use_cassette('test/vcr_cassettes/test_nodes_limit.yaml')
def test_nodes_limit():
    "limit param in registry.nodes"
    res = registry.nodes(limit=5)
    assert dict == res.__class__
    assert 5 == len(res['data'])

@vcr.use_cassette('test/vcr_cassettes/test_nodes_return.yaml')
def test_nodes_return():
    "data param in registry.nodes"
    res = registry.nodes(data='identifier', uuid="03e816b3-8f58-49ae-bc12-4e18b358d6d9")
    assert dict == res.__class__
    assert 2 == len(res)
    assert 1 == len(res['data'])
    assert 5 == len(res['data'][0])
    assert 'identifier' in res['data'][0].keys()
<commit_msg>relabel registry nodes test labels<commit_after>"""Tests for registry module - nodes methods"""
import os
import vcr
from pygbif import registry

@vcr.use_cassette('test/vcr_cassettes/test_nodes.yaml')
def test_nodes():
    "registry.nodes - basic test"
    res = registry.nodes()
    assert dict == res.__class__
    assert 2 == len(res)
    assert 100 == len(res['data'])
    assert ['data', 'meta'] == sorted(res.keys())

@vcr.use_cassette('test/vcr_cassettes/test_nodes_limit.yaml')
def test_nodes_limit():
    "registry.nodes - limit param"
    res = registry.nodes(limit=5)
    assert dict == res.__class__
    assert 5 == len(res['data'])

@vcr.use_cassette('test/vcr_cassettes/test_nodes_return.yaml')
def test_nodes_return():
    "registry.nodes - data param"
    res = registry.nodes(data='identifier', uuid="03e816b3-8f58-49ae-bc12-4e18b358d6d9")
    assert dict == res.__class__
    assert 2 == len(res)
    assert 1 == len(res['data'])
    assert 5 == len(res['data'][0])
    assert 'identifier' in res['data'][0].keys()

{'fraction_non_alphanumeric': 0.1526829268292683, 'fraction_numerical': 0.03121951219512195, 'mean_word_length': 4.286082474226804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7560426', 'n_tokens_mistral': 742, 'n_tokens_neox': 713, 'n_words': 155}