Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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