コード例 #1
0
 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")
コード例 #2
0
 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")
コード例 #3
0
 def test_flag_not_none(self):
     r = construct_server_argument("attribute", "value", {})
     self.assertEqual(r, "-attribute=value")
コード例 #4
0
 def test_flag_is_none(self):
     r = construct_server_argument("attribute", None, {})
     self.assertEqual(r, "-attribute")
コード例 #5
0
 def test_boolean_lowering_false(self):
     r = construct_server_argument("wal_enable", False, {})
     self.assertEqual(r, "-wal_enable=false")
コード例 #6
0
 def test_boolean_lowering_true(self):
     r = construct_server_argument("wal_enable", True, {})
     self.assertEqual(r, "-wal_enable=true")