How to use the flower.utils.template.humanize function in flower

To help you get started, we’ve selected a few flower 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 mher / flower / tests / unit / utils / test_template.py View on Github external
def test_keywords(self):
        self.assertEqual('SSL', humanize('ssl'))
        self.assertEqual('SSL', humanize('SSL'))

        self.assertEqual('URI', humanize('uri'))
        self.assertEqual('URI', humanize('URI'))

        self.assertEqual('UUID', humanize('uuid'))
        self.assertEqual('UUID', humanize('UUID'))

        self.assertEqual('ETA', humanize('eta'))
        self.assertEqual('ETA', humanize('ETA'))

        self.assertEqual('URL', humanize('url'))
        self.assertEqual('URL', humanize('URL'))

        self.assertEqual('args', humanize('args'))
        self.assertEqual('kwargs', humanize('kwargs'))
github mher / flower / tests / unit / utils / test_template.py View on Github external
def test_keywords(self):
        self.assertEqual('SSL', humanize('ssl'))
        self.assertEqual('SSL', humanize('SSL'))

        self.assertEqual('URI', humanize('uri'))
        self.assertEqual('URI', humanize('URI'))

        self.assertEqual('UUID', humanize('uuid'))
        self.assertEqual('UUID', humanize('UUID'))

        self.assertEqual('ETA', humanize('eta'))
        self.assertEqual('ETA', humanize('ETA'))

        self.assertEqual('URL', humanize('url'))
        self.assertEqual('URL', humanize('URL'))

        self.assertEqual('args', humanize('args'))
        self.assertEqual('kwargs', humanize('kwargs'))
github mher / flower / tests / unit / utils / test_template.py View on Github external
def test_strings(self):
        self.assertEqual('Max tasks per child',
                         humanize('max_tasks_per_child'))
        self.assertEqual('URI prefix', humanize('uri_prefix'))
        self.assertEqual('Max concurrency', humanize('max-concurrency'))
github mher / flower / tests / unit / utils / test_template.py View on Github external
def test_keywords(self):
        self.assertEqual('SSL', humanize('ssl'))
        self.assertEqual('SSL', humanize('SSL'))

        self.assertEqual('URI', humanize('uri'))
        self.assertEqual('URI', humanize('URI'))

        self.assertEqual('UUID', humanize('uuid'))
        self.assertEqual('UUID', humanize('UUID'))

        self.assertEqual('ETA', humanize('eta'))
        self.assertEqual('ETA', humanize('ETA'))

        self.assertEqual('URL', humanize('url'))
        self.assertEqual('URL', humanize('URL'))

        self.assertEqual('args', humanize('args'))
        self.assertEqual('kwargs', humanize('kwargs'))
github mher / flower / tests / unit / utils / test_template.py View on Github external
def test_uuid(self):
        uuid = '5cf83762-9507-4dc5-8e5a-ad730379b099'
        self.assertEqual(uuid, humanize(uuid))
github mher / flower / tests / unit / utils / test_template.py View on Github external
def test_time(self):
        from pytz import utc
        self.assertEqual(1343911558.305793, humanize(1343911558.305793))
        self.assertEqual(format_time(1343911558.305793, utc),
                         humanize(1343911558.305793, type='time'))
github mher / flower / tests / unit / utils / test_template.py View on Github external
def test_bool(self):
        self.assertEqual(True, humanize(True))
        self.assertEqual(False, humanize(False))
github mher / flower / tests / unit / utils / test_template.py View on Github external
def test_numbers(self):
        self.assertEqual(0, humanize(0))
        self.assertEqual(3, humanize(3))
        self.assertEqual(0.2, humanize(0.2))
github mher / flower / tests / unit / utils / test_template.py View on Github external
def test_time(self):
        from pytz import utc
        self.assertEqual(1343911558.305793, humanize(1343911558.305793))
        self.assertEqual(format_time(1343911558.305793, utc),
                         humanize(1343911558.305793, type='time'))
github mher / flower / tests / unit / utils / test_template.py View on Github external
def test_keywords(self):
        self.assertEqual('SSL', humanize('ssl'))
        self.assertEqual('SSL', humanize('SSL'))

        self.assertEqual('URI', humanize('uri'))
        self.assertEqual('URI', humanize('URI'))

        self.assertEqual('UUID', humanize('uuid'))
        self.assertEqual('UUID', humanize('UUID'))

        self.assertEqual('ETA', humanize('eta'))
        self.assertEqual('ETA', humanize('ETA'))

        self.assertEqual('URL', humanize('url'))
        self.assertEqual('URL', humanize('URL'))

        self.assertEqual('args', humanize('args'))
        self.assertEqual('kwargs', humanize('kwargs'))