예제 #1
0
    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")
예제 #2
0
    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")
예제 #3
0
 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")
예제 #4
0
    def test_basic(self):
        conn = Connection()

        assert_equal(conn.prefix, "http://")
        assert_equal(conn.url(), "http://localhost:8529")
예제 #5
0
 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")
예제 #6
0
    def test_basic(self):
        conn = Connection()

        assert_equal(conn.prefix, "http://")
        assert_equal(conn.url(), "http://localhost:8529")