'Testing the api/read endpoint'

def test_api_read(self):

    client = self.app.test_client()
    self.login(client, DEFAULT_ADMIN_USER, DEFAULT_ADMIN_PASSWORD)
    self.insert_data()
    rv = client.get('/model1formattedview/api/read')
    eq_(rv.status_code, 200)
    data = json.loads(rv.data.decode('utf-8'))
    assert ('result' in data)
    assert ('pks' in data)
    assert (len(data.get('result')) > 10)
