1. Rufus Pollock
  2. wdmmg

Source

wdmmg / wdmmg / tests / test_cofog.py

import pkg_resources

import wdmmg.model as model
from wdmmgext.load import cofog

class TestCOFOGLoader(object):
    def test_cofog(self):
        model.mongo.drop_db()
        cofog.load_file(pkg_resources.resource_stream('wdmmg', 'tests/COFOG_english_structure_short.txt'))
        codes = model.Classifier.find()
        assert codes.count()==12, codes