You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
319 B
11 lines
319 B
4 years ago
|
import nose.tools as nt
|
||
|
|
||
|
from notebook import i18n
|
||
|
|
||
|
def test_parse_accept_lang_header():
|
||
|
palh = i18n.parse_accept_lang_header
|
||
|
nt.assert_equal(palh(''), [])
|
||
|
nt.assert_equal(palh('zh-CN,en-GB;q=0.7,en;q=0.3'),
|
||
|
['en', 'en_GB', 'zh', 'zh_CN'])
|
||
|
nt.assert_equal(palh('nl,fr;q=0'), ['nl'])
|