title: DB not changing when testing Flask-Security with peewe and PyTest
body: <p>I just got into testing my flask application with pytest, and it mostly works as expected. Unfortunately the test uses the live DB instead a mock one. I'm quite sure this has to do with the fact, that flask-security is using peewee's database_wrapper instead of an "straightforward" database.</p>
  
  <p>Here's some code. This is from the test:</p>
  
  <pre><code>@pytest.fixture
  def client():
  db_fd, belavoco_server.app.config['DATABASE']  = {  'name': 'userLogin_TEST.db',
                                                      'engine': 'peewee.SqliteDatabase' }                                                   }
  
  belavoco_server.app.config['TESTING'] = True
  client = belavoco_server.app.test_client()
  
  #this seems not to help at all
  with belavoco_server.app.app_context():
       belavoco_server.users.user_managment.db_wrapper.init_app(belavoco_server.app)
  
  yield client
  
  os.close(db_fd)
  os.unlink(belavoco_server.app.config['DATABASE'])
  </code></pre>
  
  <p>This is some code from my bv_user_model.py</p>
  
  <pre><code>app.config['DATABASE'] = {
      'name': 'userLogin.db',
      'engine': 'peewee.SqliteDatabase',
  }
  
  app.config['SECURITY_URL_PREFIX'] = "/users"
  
  # Create a database instance that will manage the connection and
  # execute queries
  db_wrapper = FlaskDB(app)
  
  class Role(db_wrapper.Model, RoleMixin):
      name = CharField(unique=True, default="standard")
      description = TextField(null=True)
  
      def __repr__(self):
          return self.name
  </code></pre>
  
  <p>When preforming the test, Flask is using the <code>userLogin.db</code> instead of <code>userLogin_TEST.db</code>. I suppose this is because of the db_wrapper in <code>bv_user_model.py</code> - but I did not find a way to change this behaviour. Any help would be greatly appreciated!</p>