예제 #1
0
 def test_normalize_NormalizedDocument(self):
     output = celerytasks._consume(DIRECTORY)
     results = output[0]
     registry = output[1]
     with open(MANIFEST) as f:
         manifest = yaml.load(f)
     for result in results:
         test_doc = celerytasks._normalize(result, TIMESTAMP, registry, manifest)
         assert isinstance(test_doc, NormalizedDocument)
예제 #2
0
 def test_normalize_NormalizedDocument(self):
     output = celerytasks._consume(DIRECTORY)
     results = output[0]
     registry = output[1]
     with open(MANIFEST) as f:
         manifest = yaml.load(f)
     for result in results:
         test_doc = celerytasks._normalize(result, TIMESTAMP, registry,
                                           manifest)
         assert isinstance(test_doc, NormalizedDocument)
예제 #3
0
 def test_consume_consumer_version(self):
     results = celerytasks._consume(DIRECTORY)
     assert isinstance(results[2], str)
예제 #4
0
 def test_consume_registry_hasconsumefunc(self):
     results = celerytasks._consume(DIRECTORY)
     registry = results[1]
     registry_dicts = registry.consumers[DIRECTORY]
     assert callable(registry_dicts['consume'])
예제 #5
0
 def test_consume_registry_consumers_haskeys(self):
     results = celerytasks._consume(DIRECTORY)
     registry = results[1]
     registry_dicts = registry.consumers[DIRECTORY]
     assert registry_dicts.keys() == ['normalize', 'consume']
예제 #6
0
 def test_consume_registry_consumers_isdict(self):
     results = celerytasks._consume(DIRECTORY)
     registry = results[1]
     registry_dicts = registry.consumers[DIRECTORY]
     assert isinstance(registry_dicts, dict)
예제 #7
0
 def test_consume_Registry(self):
     results = celerytasks._consume(DIRECTORY)
     assert isinstance(results[1], _Registry)
예제 #8
0
 def test_consume_RawDoc(self):
     result_list = celerytasks._consume(DIRECTORY)
     for result in result_list[0]:
         assert isinstance(result, RawDocument)
예제 #9
0
 def test_consume_consumer_version(self):
     results = celerytasks._consume(DIRECTORY)
     assert isinstance(results[2], str)
예제 #10
0
 def test_consume_registry_hasconsumefunc(self):
     results = celerytasks._consume(DIRECTORY)
     registry = results[1]
     registry_dicts = registry.consumers[DIRECTORY]
     assert callable(registry_dicts['consume'])
예제 #11
0
 def test_consume_registry_consumers_haskeys(self):
     results = celerytasks._consume(DIRECTORY)
     registry = results[1]
     registry_dicts = registry.consumers[DIRECTORY]
     assert registry_dicts.keys() == ['normalize', 'consume']
예제 #12
0
 def test_consume_registry_consumers_isdict(self):
     results = celerytasks._consume(DIRECTORY)
     registry = results[1]
     registry_dicts = registry.consumers[DIRECTORY]
     assert isinstance(registry_dicts, dict)
예제 #13
0
 def test_consume_Registry(self):
     results = celerytasks._consume(DIRECTORY)
     assert isinstance(results[1], _Registry)
예제 #14
0
 def test_consume_RawDoc(self):
     result_list = celerytasks._consume(DIRECTORY)
     for result in result_list[0]:
         assert isinstance(result, RawDocument)