How to use the mike.versions.Versions.loads function in mike

To help you get started, we’ve selected a few mike examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jimporter / mike / test / unit / test_versions.py View on Github external
def test_loads(self):
        versions = Versions.loads(
            '[' +
            '{"version": "2.0", "title": "2.0.2", "aliases": ["latest"]}, ' +
            '{"version": "1.0", "title": "1.0.1", "aliases": ["stable"]}' +
            ']'
        )
        self.assertEqual(list(versions), [
            VersionInfo('2.0', '2.0.2', aliases={'latest'}),
            VersionInfo('1.0', '1.0.1', aliases={'stable'}),
        ])