예제 #1
0
    def user_country(self):
        """The country of the currently logged in user.

        The :attr:`~SessionEvent.OFFLINE_STATUS_UPDATED` event is emitted on
        the session object when this changes.
        """
        return utils.to_country(lib.sp_session_user_country(self._sp_session))
예제 #2
0
파일: session.py 프로젝트: jcranston/juke
    def user_country(self):
        """The country of the currently logged in user.

        The :attr:`~SessionEvent.OFFLINE_STATUS_UPDATED` event is emitted on
        the session object when this changes.
        """
        return utils.to_country(lib.sp_session_user_country(self._sp_session))
예제 #3
0
 def test_to_country(self):
     self.assertEqual(utils.to_country(20047), 'NO')
     self.assertEqual(utils.to_country(21317), 'SE')