<s> import unittest2 <EOL> class TestConnection ( unittest2 . TestCase ) : <EOL> def _getTargetClass ( self ) : <EOL> from gcloud . logging . connection import Connection <EOL> return Connection <EOL> def _makeOne ( self , * args , ** kw ) : <EOL> return self . _getTargetClass ( ) ( * args , ** kw ) <EOL> def test_default_url ( self ) : <EOL> creds = _Credentials ( ) <EOL> conn = self . _makeOne ( creds ) <EOL> klass = self . _getTargetClass ( ) <EOL> self . assertEqual ( conn . credentials . _scopes , klass . SCOPE ) <EOL> class _Credentials ( object ) : <EOL> _scopes = None <EOL> @ staticmethod <EOL> def create_scoped_required ( ) : <EOL> return True <EOL> def create_scoped ( self , scope ) : <EOL> self . _scopes = scope <EOL> return self </s>
