File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1761,7 +1761,7 @@ def build_createbug(self,
17611761 localdict ["cc" ] = listify (cc )
17621762 if depends_on :
17631763 localdict ["depends_on" ] = listify (depends_on )
1764- if groups :
1764+ if groups is not None :
17651765 localdict ["groups" ] = listify (groups )
17661766 if keywords :
17671767 localdict ["keywords" ] = listify (keywords )
Original file line number Diff line number Diff line change 1+ from bugzilla .base import Bugzilla
2+
3+
4+ def test_build_createbug ():
5+ bz = Bugzilla (url = None )
6+
7+ args = {"product" : "Ubuntu 33⅓" , "summary" : "Hello World" , "alias" : "CVE-2024-0000" }
8+ result = bz .build_createbug (** args )
9+ assert result == args
10+
11+ result = bz .build_createbug (groups = None , ** args )
12+ assert result == args
13+
14+ args ["groups" ] = []
15+ result = bz .build_createbug (** args )
16+ assert result == args
17+
18+ args ["groups" ] += ["the-group" ]
19+ result = bz .build_createbug (** args )
20+ assert result == args
You can’t perform that action at this time.
0 commit comments