# Path: ckanext/dcatapit/tests/utils.py
# def get_voc_file(fname):
#     return _get_base_file(fname, 'vocabularies')
# 
# SKOS_THEME_FILE = 'data-theme-skos.rdf'
# 
# def get_test_file(fname):
#     return os.path.join(os.path.dirname(__file__), 'files', fname)
# 
# def load_graph(path=None, url=None):
#     if (not path and not url) or (path and url):
#         raise ValueError('You should provide either path or url')
# 
#     from ckanext.dcat.profiles import namespaces
# 
#     g = Graph()
#     for prefix, namespace in namespaces.items():
#         g.bind(prefix, namespace)
# 
#     if url:
#         g.parse(location=url)
#     else:
#         g.parse(source=path)
# 
#     return g


import os
import nose
import pytest
import ckanext.dcatapit.helpers as helpers
from ckanext.dcatapit.tests.utils import get_voc_file, SKOS_THEME_FILE, get_test_file, load_graph
    from ckanext.dcatapit.commands.vocabulary import EUROPEAN_THEME_NAME, do_load




eq_ = nose.tools.eq_
ok_ = nose.tools.ok_


def test_get_dcatapit_package_schema():
    schema = helpers.get_dcatapit_package_schema()
    ok_(schema)
    eq_(schema[0].get('name'), 'identifier')


def test_get_dcatapit_organization_schema():
    schema = helpers.get_dcatapit_organization_schema()
    ok_(schema)
    eq_(schema[0].get('name'), 'email')



# Path: ckanext/dcatapit/tests/utils.py
# def get_voc_file(fname):
#     return _get_base_file(fname, 'vocabularies')
# 
# SKOS_THEME_FILE = 'data-theme-skos.rdf'
# 
# def get_test_file(fname):
#     return os.path.join(os.path.dirname(__file__), 'files', fname)
# 
# def load_graph(path=None, url=None):
#     if (not path and not url) or (path and url):
#         raise ValueError('You should provide either path or url')
# 
#     from ckanext.dcat.profiles import namespaces
# 
#     g = Graph()
#     for prefix, namespace in namespaces.items():
#         g.bind(prefix, namespace)
# 
#     if url:
#         g.parse(location=url)
#     else:
#         g.parse(source=path)
# 
#     return g


# Path: ckanext/dcatapit/tests/test_helpers.py
import os
import nose
import pytest
import ckanext.dcatapit.helpers as helpers
from ckanext.dcatapit.tests.utils import get_voc_file, SKOS_THEME_FILE, get_test_file, load_graph
    from ckanext.dcatapit.commands.vocabulary import EUROPEAN_THEME_NAME, do_load





eq_ = nose.tools.eq_
ok_ = nose.tools.ok_


def test_get_dcatapit_package_schema():
    schema = helpers.get_dcatapit_package_schema()
    ok_(schema)
    eq_(schema[0].get('name'), 'identifier')


def test_get_dcatapit_organization_schema():
    schema = helpers.get_dcatapit_organization_schema()
    ok_(schema)
    eq_(schema[0].get('name'), 'email')



def test_get_dcatapit_configuration_schema():