def test_modify(self): conn = Connection() conn.is_https = True conn.port = 1234 assert_equal(conn.url(), "https://localhost:1234") conn.is_https = False conn.port = 9922 assert_not_equal(conn.url(), "http://localhost:9922")
def test_database_prefix(self): conn = Connection(db="test") assert_equal(conn.url(), "http://localhost:8529/_db/test") assert_equal(conn.url(db_prefix=False), "http://localhost:8529")
def test_basic(self): conn = Connection() assert_equal(conn.prefix, "http://") assert_equal(conn.url(), "http://localhost:8529")