Beispiel #1
0
    def __init__(self, **kw):
        '''
        ctor

        Unlike many extracted components, this one currently does not
        accept a selector argument.  The source of the desktop page is
        scanned to locate the google analytics tracking code.
        
        '''
        assert 'selector' not in kw
        if 'idname' not in kw:
            kw['idname'] = util.idname('ga')
        kw['selector'] = None
        super().__init__(**kw)
Beispiel #2
0
 def test_idname(self):
     self.assertSequenceEqual('mwu-elem-42', util.idname(42))
     self.assertSequenceEqual('mwu-elem-0', util.idname(0))
     self.assertSequenceEqual('mwu-elem-blah', util.idname('blah'))