-
Notifications
You must be signed in to change notification settings - Fork 14k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sql test connection work with saved Database instance (#694)
Fix #596
- Loading branch information
1 parent
69d37d8
commit afa1f09
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,6 +114,18 @@ def test_misc(self): | |
assert self.client.get('/health').data.decode('utf-8') == "OK" | ||
assert self.client.get('/ping').data.decode('utf-8') == "OK" | ||
|
||
def test_testconn(self): | ||
data = json.dumps({'uri': 'sqlite:////tmp/caravel_unittests.db'}) | ||
response = self.client.post('/caravel/testconn', data=data, content_type='application/json') | ||
assert response.status_code == 200 | ||
|
||
data = json.dumps({ | ||
'uri': 'postgresql+psycopg2://foo:[email protected]/bar', | ||
'name': 'main' | ||
}) | ||
response = self.client.post('/caravel/testconn', data=data, content_type='application/json') | ||
assert response.status_code == 200 | ||
|
||
def test_warm_up_cache(self): | ||
slice = db.session.query(models.Slice).first() | ||
resp = self.client.get( | ||
|