示例#1
0
def test_bundle_bundle(patch, bundle):
    patch.many(Bundle, ['find_stories', 'services', 'compile', 'parser'])
    result = bundle.bundle()
    Bundle.parser.assert_called_with(None)
    Bundle.compile.assert_called_with(Bundle.find_stories(),
                                      parser=Bundle.parser())
    expected = {'stories': bundle.stories, 'services': Bundle.services(),
                'entrypoint': Bundle.find_stories()}
    assert result == expected
示例#2
0
def test_bundle_bundle(patch, bundle):
    patch.many(Bundle, ["find_stories", "services", "compile", "parser"])
    result = bundle.bundle()
    Bundle.parser.assert_called_with(None)
    Bundle.compile.assert_called_with(Bundle.find_stories(),
                                      parser=Bundle.parser())
    expected = (
        {
            "stories": bundle.stories,
            "services": Bundle.services(),
            "entrypoint": Bundle.find_stories(),
        },
        bundle.deprecations,
    )
    assert result == expected