GitHub Actions / Test Results
failed
Dec 13, 2024 in 0s
2 fail, 1 skipped, 235 pass in 1m 32s
Annotations
Check warning on line 0 in sarracenia.config_test
github-actions / Test Results
test_subscription (sarracenia.config_test) failed
tests/junit/test-results.xml [took 0s]
Raw output
AssertionError: assert 2 == 1
+ where 2 = len([{'broker': <sarracenia.config.credentials.Credential object at 0x7f7a8cc22fb0>, 'bindings': [{'exchange': 'hoho1', 'p...ernal.cloudapp.net_03952778', 'cleanup_needed': None, 'durable': True, 'prefetch': 25, 'bind': True, 'declare': True}}])
+ where [{'broker': <sarracenia.config.credentials.Credential object at 0x7f7a8cc22fb0>, 'bindings': [{'exchange': 'hoho1', 'p...ernal.cloudapp.net_03952778', 'cleanup_needed': None, 'durable': True, 'prefetch': 25, 'bind': True, 'declare': True}}] = <sarracenia.config.Config object at 0x7f7a8cc22f80>.subscriptions
def test_subscription():
o = copy.deepcopy(sarracenia.config.default_config())
o.component = 'subscribe'
o.config = 'ex1'
o.action = 'start'
o.no = 1
before_add=len(o.credentials.credentials)
o.credentials.add( 'amqp://lapinferoce:etpoilu@localhost' )
o.credentials.add( 'amqp://capelli:tropcuit@localhost' )
o.parse_line( o.component, o.config, "subscribe/ex1", 1, "broker amqp://lapinferoce@localhost" )
o.parse_line( o.component, o.config, "subscribe/ex1", 2, "exchange hoho1" )
assert( o.exchange == "hoho1" )
o.parse_line( o.component, o.config, "subscribe/ex1", 3, "subtopic hoho.#" )
o.parse_line( o.component, o.config, "subscribe/ex1", 3, "subtopic lala.hoho.#" )
assert( hasattr(o,'subscriptions') )
> assert( len(o.subscriptions)==1 )
E AssertionError: assert 2 == 1
E + where 2 = len([{'broker': <sarracenia.config.credentials.Credential object at 0x7f7a8cc22fb0>, 'bindings': [{'exchange': 'hoho1', 'p...ernal.cloudapp.net_03952778', 'cleanup_needed': None, 'durable': True, 'prefetch': 25, 'bind': True, 'declare': True}}])
E + where [{'broker': <sarracenia.config.credentials.Credential object at 0x7f7a8cc22fb0>, 'bindings': [{'exchange': 'hoho1', 'p...ernal.cloudapp.net_03952778', 'cleanup_needed': None, 'durable': True, 'prefetch': 25, 'bind': True, 'declare': True}}] = <sarracenia.config.Config object at 0x7f7a8cc22f80>.subscriptions
tests/sarracenia/config_test.py:336: AssertionError
Check warning on line 0 in sarracenia.flowcb.filter.geometry_test
github-actions / Test Results
test_after_accept (sarracenia.flowcb.filter.geometry_test) failed
tests/junit/test-results.xml [took 0s]
Raw output
assert 1 == 2
+ where 1 = len([{'_format': 'v03', '_deleteOnPost': {'_format'}, 'new_file': '/foo/bar/NewFile.txt', 'new_dir': '/foo/bar', 'geometry': '{"type": "Point", "coordinates": [-76, 39.284]}'}])
+ where [{'_format': 'v03', '_deleteOnPost': {'_format'}, 'new_file': '/foo/bar/NewFile.txt', 'new_dir': '/foo/bar', 'geometry': '{"type": "Point", "coordinates": [-76, 39.284]}'}] = namespace(ok=[], incoming=[{'_format': 'v03', '_deleteOnPost': {'_format'}, 'new_file': '/foo/bar/NewFile.txt', 'new_d...wFile.txt', 'new_dir': '/foo/bar', 'geometry': '{"type": "LineString", "coordinates": [93, 100]}'}], directories_ok=[]).rejected
def test_after_accept():
options = sarracenia.config.default_config()
options.logLevel = 'DEBUG'
# Testing when the config is a polygon
options.geometry = [features['poly1']]
geojson = sarracenia.flowcb.filter.geometry.Geometry(options)
worklist = make_worklist()
#accepted
worklist.incoming.append(make_message("poly2"))
worklist.incoming.append(make_message("pointA"))
#rejected
worklist.incoming.append(make_message("poly3"))
worklist.incoming.append(make_message("pointB"))
#failed
worklist.incoming.append(make_message("line1"))
geojson.after_accept(worklist)
> assert len(worklist.rejected) == 2
E assert 1 == 2
E + where 1 = len([{'_format': 'v03', '_deleteOnPost': {'_format'}, 'new_file': '/foo/bar/NewFile.txt', 'new_dir': '/foo/bar', 'geometry': '{"type": "Point", "coordinates": [-76, 39.284]}'}])
E + where [{'_format': 'v03', '_deleteOnPost': {'_format'}, 'new_file': '/foo/bar/NewFile.txt', 'new_dir': '/foo/bar', 'geometry': '{"type": "Point", "coordinates": [-76, 39.284]}'}] = namespace(ok=[], incoming=[{'_format': 'v03', '_deleteOnPost': {'_format'}, 'new_file': '/foo/bar/NewFile.txt', 'new_d...wFile.txt', 'new_dir': '/foo/bar', 'geometry': '{"type": "LineString", "coordinates": [93, 100]}'}], directories_ok=[]).rejected
tests/sarracenia/flowcb/filter/geometry_test.py:100: AssertionError
Loading