File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ import os
2+ import pytest
3+
4+ from rethinkdb import r
5+ from tests .helpers import IntegrationTestCaseBase , INTEGRATION_TEST_DB
6+
7+
8+ @pytest .mark .integration
9+ class TestConnect (IntegrationTestCaseBase ):
10+ def setup_method (self ):
11+ super (TestConnect , self ).setup_method ()
12+
13+ def test_connect (self ):
14+ db_url = "rethinkdb://{host}" .format (host = self .rethinkdb_host )
15+
16+ assert self .r .connect (url = db_url ) is not None
17+
18+ def test_connect_with_username (self ):
19+ db_url = "rethinkdb://admin@{host}" .format (host = self .rethinkdb_host )
20+
21+ assert self .r .connect (url = db_url ) is not None
22+
23+ def test_connect_to_db (self ):
24+ db_url = "rethinkdb://{host}/{database}" .format (
25+ host = self .rethinkdb_host ,
26+ database = INTEGRATION_TEST_DB
27+ )
28+
29+ assert self .r .connect (url = db_url ) is not None
You can’t perform that action at this time.
0 commit comments