示例#1
0
    def test_set_user_agent(self):
        client = minio.Minio('http://localhost')

        expected_user_agent = 'minio-py/' + get_version() + ' (' + \
            platform.system() + '; ' + \
            platform.machine() + ')'
        expected_user_agent += ' hello/1.0.0 (World; Edition)'

        client.set_user_agent('hello', '1.0.0', ['World', 'Edition'])
        eq_(client._user_agent, expected_user_agent)
示例#2
0
 def test_default_user_agent(self):
     client = minio.Minio('http://localhost')
     eq_(client._user_agent, 'minio-py/' + get_version()+ ' (' + \
         platform.system() + \
         '; ' + platform.machine() + ')')