def test_path_is_expanded_parent(self): r = construct_server_argument("argument_path", "../hello", {"bin_dir": "/some/binary/directory"}) self.assertEqual(r, "-argument_path=/some/binary/hello")
def test_non_path_is_not_expanded_parent(self): r = construct_server_argument("some_argument", "../hello", {"bin_dir": "/some/binary/directory"}) self.assertEqual(r, "-some_argument=../hello")
def test_flag_not_none(self): r = construct_server_argument("attribute", "value", {}) self.assertEqual(r, "-attribute=value")
def test_flag_is_none(self): r = construct_server_argument("attribute", None, {}) self.assertEqual(r, "-attribute")
def test_boolean_lowering_false(self): r = construct_server_argument("wal_enable", False, {}) self.assertEqual(r, "-wal_enable=false")
def test_boolean_lowering_true(self): r = construct_server_argument("wal_enable", True, {}) self.assertEqual(r, "-wal_enable=true")