def test_can_summarize_mutation(self): # summarize a mock mutation summarized = summarize_mutation(mutation_name='test_mutation', event='foo.bar', inputs=['foo', 'bar'], outputs=['bar', 'baz']) # check that it matches what we expect expected = { 'name': 'test_mutation', 'event': 'foo.bar', 'isAsync': False, 'inputs': ['foo', 'bar'], 'outputs': ['bar', 'baz'] } # make sure the two match assert summarized == expected, ( "Summarized mutation did not match expectation.")
def test_can_summarize_mutation(self): # summarize a mock mutation summarized = summarize_mutation( mutation_name='test_mutation', event='foo.bar', inputs=['foo','bar'], outputs=['bar','baz'] ) # check that it matches what we expect expected = { 'name': 'test_mutation', 'event': 'foo.bar', 'isAsync': False, 'inputs': ['foo','bar'], 'outputs': ['bar','baz'] } # make sure the two match assert summarized == expected, ( "Summarized mutation did not match expectation." )
def test_can_summarize_async_mutation(self): # summarize a mock mutation summarized = summarize_mutation('test_mutation', 'foo.bar', isAsync=True, inputs=['foo', 'bar'], outputs=['bar', 'baz']) # check that it matches what we expect expected = { 'name': 'test_mutation', 'event': 'foo.bar', 'isAsync': True, 'inputs': ['foo', 'bar'], 'outputs': ['bar', 'baz'] } # make sure the two match assert summarized == expected, ( "Summarized async mutation did not match expectation. Found {}, expected {}"\ .format(summarized, expected) )
def test_can_summarize_async_mutation(self): # summarize a mock mutation summarized = summarize_mutation( 'test_mutation', 'foo.bar', isAsync=True, inputs=['foo','bar'], outputs=['bar','baz'] ) # check that it matches what we expect expected = { 'name': 'test_mutation', 'event': 'foo.bar', 'isAsync': True, 'inputs':['foo','bar'], 'outputs': ['bar','baz'] } # make sure the two match assert summarized == expected, ( "Summarized async mutation did not match expectation. Found {}, expected {}"\ .format(summarized, expected) )