 
 withDummyClient = (context, callback) ->
 
+  [context, callback] = [callback, context]  unless callback
+  context         ?= { group : 'koding' }
+
   generateDummyClient context, (err, client) ->
     expect(err).to.not.exist
     callback { client }


withConvertedUser = (opts, callback) ->

  { context, userFormData } = opts  if opts

  context      ?= { group : 'koding' }

      client.sessionToken        = newToken
      client.connection.delegate = account

      if opts?.userFormData?
      then callback { client, account, sessionToken : newToken }
      else callback { client, account, sessionToken : newToken, userFormData }

