       restrictedQuery = KodingLogger
         .generateRestrictedQuery group, query, scope
 
+      identifier = KodingLogger.getIdentifier scope, group
+
       expect restrictedQuery
         .to.exist
-        .to.be.equal "[#{scope}:#{group}]"
+        .to.be.equal identifier
 
       done()
 

      restrictedQuery = KodingLogger
        .generateRestrictedQuery group, query, scope

      expect restrictedQuery
        .to.exist
        .to.be.equal "[#{scope}:#{group}] AND #{query}"

      done()



      query = KodingLogger.generateRestrictedQuery group, log, scope

      identifier = KodingLogger.getIdentifier scope, group

      KodingLogger.connect()

      KodingLogger.pt.on 'connect', ->
