Example #1
0
 def test_get_site_and_lang(self):
     """Test get_site_and_lang function with parameters."""
     family, code, user = guf.get_site_and_lang(
         default_family='test', default_lang='foo', default_username='******',
         force=True)
     self.assertEqual(family, 'test')
     self.assertEqual(code, 'test')
     self.assertEqual(user, 'bar')
 def test_default_get_site_and_lang(self):
     """Test get_site_and_lang function with defaults."""
     family, code, user = guf.get_site_and_lang(force=True)
     self.assertEqual(family, 'wikipedia')
     self.assertEqual(code, 'en')
     self.assertIsNone(user)