예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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