File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 11# =================================================================
22#
33# Authors: Ricardo Garcia Silva <ricardo.garcia.silva@gmail.com>
4+ # Authors: Tom Kralidis
45#
56# Copyright (c) 2017 Ricardo Garcia Silva
7+ # Copyright (c) 2025 Tom Kralidis
68#
79# Permission is hereby granted, free of charge, to any person
810# obtaining a copy of this software and associated documentation
@@ -371,3 +373,16 @@ def test_programmatic_import_with_invalid_path(invalid_import_path):
371373def test_sanitize_url ():
372374 result = util .sanitize_db_connect ("postgresql://username:password@localhost/pycsw" )
373375 assert result == "postgresql://***:***@localhost/pycsw"
376+
377+
378+ def test_str2bool ():
379+ assert util .str2bool ('true' )
380+ assert util .str2bool (True )
381+ assert util .str2bool ('1' )
382+ assert util .str2bool ('yes' )
383+ assert util .str2bool ('on' )
384+ assert not util .str2bool ('0' )
385+ assert not util .str2bool ('false' )
386+ assert not util .str2bool (False )
387+ assert not util .str2bool ('off' )
388+ assert not util .str2bool ('no' )
You can’t perform that action at this time.
0 commit comments