     string += Math.random().toString(36).substr(2) while string.length < length
     string.substr 0, length
 
+
 describe "Data handling tests", ->
+
 
     # Clear DB, create a new one, then init data for tests.
     before (done) ->

            before cleanRequest

            it "When I send a request to delete the master key", (done) ->
                client.del "accounts/", (error, response, body) => 
                    @response = response
                    done()
 
            it "Then master key should be null", ->
                should.equal app.crypto.masterKey, null

            it "Then HTTP status 204 should be returned", ->
                @response.statusCode.should.equal 204 

        describe "Initialize the master key in a second connection", ->
            before cleanRequest

            it "When I send a request to initialize of the master key", \
                    (done) ->
                client.post 'accounts/password/', {pwd: @randomValue}, \
                        (error, response, body) =>
                    @response = response
                    done()

should = require('chai').Should()
async = require('async')
crypto = require('../lib/crypto.coffee')
Client = require('request-json').JsonClient

app = require('../server')
user = require('../lib/user.coffee')


client = new Client("http://localhost:8888/")
db = require('../helpers/db_connect_helper').db_connect()


# helpers

