 
       it 'should ensure that account and group are deleted', (done) ->
 
+        username = account.getAt 'profile.nickname'
+
         queue = [
           (next) ->
-            username = account.profile.nickname
             JAccount.one { 'profile.nickname' : username }, (err, account_) ->
               expect(err).to.not.exist
               expect(account_).to.not.exist

JInvitation      = require './invitation'
JApiToken        = require './apitoken'
JComputeStack    = require './stack'

JStackTemplate   = require './computeproviders/stacktemplate'
JCredential      = require './computeproviders/credential'

{ generateStackTemplateData } = require \
  '../../../testhelper/models/computeproviders/stacktemplatehelper'



  withDummyClient
  withConvertedUser
  generateDummyClient
  generateUserInfo
  createCustomClient
  generateRandomString
  generateRandomEmail
  checkBongoConnectivity } = require '../../../testhelper'

{ createUserAndMachine } = require '../../../testhelper/models/computeproviders/machinehelper'

{ generateMetaData } = require \
  '../../../testhelper/models/computeproviders/credentialhelper'
