File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 88class TestApi (utils .TestCase ):
99 def setUp (self ):
1010 detectlanguage .configuration .api_key = os .environ ['DETECTLANGUAGE_API_KEY' ]
11-
11+
1212 def test_simple_detect (self ):
1313 result = detectlanguage .simple_detect ("Hello world" )
1414 eq_ ('en' , result )
@@ -26,6 +26,10 @@ def test_detect_array(self):
2626 eq_ ('en' , result [0 ][0 ]['language' ])
2727 eq_ ('lt' , result [1 ][0 ]['language' ])
2828
29+ def test_detect_array_with_brackets (self ):
30+ result = detectlanguage .detect (["[2]Hello world" , "Ėjo ežiukas" ])
31+ eq_ (2 , len (result ))
32+
2933 def test_user_status (self ):
3034 result = detectlanguage .user_status ()
3135 eq_ ('ACTIVE' , result ['status' ])
@@ -45,4 +49,3 @@ class TestApiErrors(utils.TestCase):
4549 def test_invalid_key (self ):
4650 detectlanguage .configuration .api_key = 'invalid'
4751 detectlanguage .detect ("Hello world" )
48-
You can’t perform that action at this time.
0 commit comments