Exemplo n.º 1
0
    def test_time_format_only_format(self):
        ext_fn = TimeFormatExtraction('EEEE')
        actual = ext_fn.build()
        expected = {
            'type': 'timeFormat',
            'format': 'EEEE',
        }

        assert actual == expected
Exemplo n.º 2
0
    def test_time_format_only_format(self):
        ext_fn = TimeFormatExtraction('EEEE')
        actual = ext_fn.build()
        expected = {
            'type': 'timeFormat',
            'format': 'EEEE',
        }

        assert actual == expected
Exemplo n.º 3
0
    def test_time_format_no_timezone(self):
        ext_fn = TimeFormatExtraction('EEEE', 'en-US')
        actual = ext_fn.build()
        expected = {
            'type': 'timeFormat',
            'format': 'EEEE',
            'locale': 'en-US',
        }

        assert actual == expected
Exemplo n.º 4
0
    def test_time_format_no_timezone(self):
        ext_fn = TimeFormatExtraction('EEEE', 'en-US')
        actual = ext_fn.build()
        expected = {
            'type': 'timeFormat',
            'format': 'EEEE',
            'locale': 'en-US',
        }

        assert actual == expected
Exemplo n.º 5
0
    def test_time_format_all_set(self):
        ext_fn = TimeFormatExtraction("EEEE", "en-US", "Europe/Berlin")
        actual = ext_fn.build()
        expected = {
            "type": "timeFormat",
            "format": "EEEE",
            "locale": "en-US",
            "timeZone": "Europe/Berlin",
        }

        assert actual == expected
Exemplo n.º 6
0
    def test_time_format_all_set(self):
        ext_fn = TimeFormatExtraction('EEEE', 'en-US', 'Europe/Berlin')
        actual = ext_fn.build()
        expected = {
            'type': 'timeFormat',
            'format': 'EEEE',
            'locale': 'en-US',
            'timeZone': 'Europe/Berlin'
        }

        assert actual == expected
Exemplo n.º 7
0
    def test_time_format_all_set(self):
        ext_fn = TimeFormatExtraction('EEEE', 'en-US', 'Europe/Berlin')
        actual = ext_fn.build()
        expected = {
            'type': 'timeFormat',
            'format': 'EEEE',
            'locale': 'en-US',
            'timeZone': 'Europe/Berlin'
        }

        assert actual == expected
Exemplo n.º 8
0
    def test_time_format_only_format(self):
        ext_fn = TimeFormatExtraction("EEEE")
        actual = ext_fn.build()
        expected = {"type": "timeFormat", "format": "EEEE"}

        assert actual == expected
Exemplo n.º 9
0
    def test_time_format_no_timezone(self):
        ext_fn = TimeFormatExtraction("EEEE", "en-US")
        actual = ext_fn.build()
        expected = {"type": "timeFormat", "format": "EEEE", "locale": "en-US"}

        assert actual == expected
Exemplo n.º 10
0
    def test_time_format_no_timezone(self):
        ext_fn = TimeFormatExtraction("EEEE", "en-US")
        actual = ext_fn.build()
        expected = {"type": "timeFormat", "format": "EEEE", "locale": "en-US"}

        assert actual == expected
Exemplo n.º 11
0
    def test_time_format_all_set(self):
        ext_fn = TimeFormatExtraction("EEEE", "en-US", "Europe/Berlin")
        actual = ext_fn.build()
        expected = {"type": "timeFormat", "format": "EEEE", "locale": "en-US", "timeZone": "Europe/Berlin"}

        assert actual == expected
Exemplo n.º 12
0
    def test_time_format_only_format(self):
        ext_fn = TimeFormatExtraction("EEEE")
        actual = ext_fn.build()
        expected = {"type": "timeFormat", "format": "EEEE"}

        assert actual == expected