   generateRandomEmail
   checkBongoConnectivity } = require '../../../testhelper'
 
+{ generateMetaData } = require \
+  '../../../testhelper/models/computeproviders/credentialhelper'
+
+{ withConvertedUserAnd } = require  \
+  '../../../testhelper/models/computeproviders/computeproviderhelper'
+
 JUser            = require './user'
 JGroup           = require './group'
 JAccount         = require './account'
 { Relationship } = require 'jraphical'
+JInvitation      = require './invitation'
+JApiToken        = require './apitoken'
+JComputeStack    = require './stack'
+
+JStackTemplate   = require './computeproviders/stacktemplate'
+JCredential      = require './computeproviders/credential'
+
+{ generateStackTemplateData } = require \
+  '../../../testhelper/models/computeproviders/stacktemplatehelper'
+
 
 
 # making sure we have db connection before tests

          done()


    describe 'delete team and account', ->

      before (done) ->



        async.series queue, done


      it 'should delete resources of the adminAccount', (done) ->

        queue = [
          (next) ->
            JApiToken.some { originId: account.getId() }, {}, (err, apiTokens) ->
              expect(err).to.not.exist
              expect(apiTokens.length).to.be.equal 0
              next()

          (next) ->
            JCredential.some { originId: account.getId() }, {}, (err, creds) ->
              expect(err).to.not.exist
              expect(creds.length).to.be.equal 0
              next()


          (next) ->
            JStackTemplate.some { originId: account.getId() }, {}, (err, stackTemplates) ->
              expect(err).to.not.exist
              expect(stackTemplates.length).to.be.equal 0
              next()

          (next) ->
            JInvitation.some { inviterId: account.getId() }, {}, (err, invitations) ->
              expect(err).to.not.exist
              expect(invitations.length).to.be.equal 0
              next()
        ]

        async.series queue, done


      it 'should ensure that account and group are deleted', (done) ->

        queue = [
          (next) ->
            username = account.profile.nickname
