Exemple #1
0
 def test_start_v1(self):
     expected = {
         "topic": "bodhi.composer.start",
         "summary": "mohanboddu requested a compose of 2 repositories",
         "app_icon": "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url": None,
         "agent_avatar": (
             "https://seccdn.libravatar.org/avatar/"
             "20652954adacfd9f6e26536bbcf3b5fbc850dc61f8a2e67c5bfbc6e345032976"
             "?s=64&d=retro"
         ),
         "usernames": ["mohanboddu"],
         "packages": [],
         'resume': False,
         'agent': 'mohanboddu',
         'composes': [ComposeV1(21, 'stable', 'rpm', True), ComposeV1(23, 'stable', 'rpm', True)]
     }
     msg = ComposerStartV1(
         body={
             "resume": False,
             "api_version": 2,
             "agent": "mohanboddu",
             "composes": [
                 {"security": True,
                  "release_id": 21,
                  "request": "stable",
                  "content_type": "rpm"},
                 {"security": True,
                  "release_id": 23,
                  "request": "stable",
                  "content_type": "rpm"}]})
     check_message(msg, expected)
Exemple #2
0
 def test_eject_v1(self):
     expected = {
         "topic":
         "bodhi.update.eject",
         "summary":
         ("mbooth's xstream-1.4.11.1-2.fc30 bodhi update "
          "was ejected from the test_repo mash. Reason: \"some reason\""),
         "app_icon":
         "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url":
         "https://bodhi.fedoraproject.org/updates/FEDORA-2019-2b055f8870",
         "agent_avatar":
         ("https://seccdn.libravatar.org/avatar/"
          "20652954adacfd9f6e26536bbcf3b5fbc850dc61f8a2e67c5bfbc6e345032976"
          "?s=64&d=retro"),
         "usernames": ["mbooth", 'mohanboddu'],
         "packages": ["xstream"],
         'repo':
         'test_repo',
         'update':
         UpdateV1('FEDORA-2019-2b055f8870',
                  [BuildV1('xstream-1.4.11.1-2.fc30')], UserV1('mbooth'),
                  'testing', None)
     }
     msg = UpdateEjectV1(
         body={
             "agent": "mohanboddu",
             "update": {
                 "alias":
                 "FEDORA-2019-2b055f8870",
                 "builds": [{
                     "release_id": 28,
                     "nvr": "xstream-1.4.11.1-2.fc30",
                     "signed": True,
                     "epoch": 0,
                     "ci_url": None,
                     "type": "rpm"
                 }],
                 "locked":
                 True,
                 "title":
                 "xstream-1.4.11.1-2.fc30",
                 'request':
                 None,
                 "status":
                 "testing",
                 'user': {
                     'name': 'mbooth'
                 }
             },
             "reason": "some reason",
             "release": {
                 "dist_tag": "fc30",
                 "long_name": "Fedora 30",
                 "name": "F30",
             },
             "request": "testing",
             "repo": "test_repo",
         })
     check_message(msg, expected)
 def test_untag_v1(self):
     expected = {
         "topic":
         "bodhi.buildroot_override.untag",
         "summary":
         "lmacken expired a buildroot override for libxcrypt-4.4.4-2.fc28",
         "app_icon":
         "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url":
         "https://bodhi.fedoraproject.org/overrides/libxcrypt-4.4.4-2.fc28",
         "agent_avatar":
         ("https://seccdn.libravatar.org/avatar/"
          "203f6cb95b44b5d38aa21425b066dd522d3e19d8919cf4b339f29e0ea7f03e9b"
          "?s=64&d=retro"),
         "usernames": ["lmacken"],
         "packages": ["libxcrypt"],
         'build':
         base.BuildV1('libxcrypt-4.4.4-2.fc28'),
         'submitter':
         base.UserV1('lmacken'),
         'agent':
         'lmacken'
     }
     msg = BuildrootOverrideUntagV1(
         body={
             "override": {
                 "nvr": "libxcrypt-4.4.4-2.fc28",
                 "submitter": {
                     "name": "lmacken"
                 },
             }
         })
     check_message(msg, expected)
Exemple #4
0
 def test_ready_for_testing_v1(self):
     expected = {
         "topic":
         "bodhi.update.status.testing.koji-build-group.build.complete",
         "summary":
         ("BaseOS CI's libselinux-2.8-6.fc29.x86_64 libsepol-2.… bodhi update "
          "is ready for testing"),
         "app_icon":
         "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url":
         "https://bodhi.fedoraproject.org/updates/FEDORA-2019-d64d0caab3",
         "agent_avatar":
         ("https://seccdn.libravatar.org/avatar/"
          "20652954adacfd9f6e26536bbcf3b5fbc850dc61f8a2e67c5bfbc6e345032976"
          "?s=64&d=retro"),
         "usernames": ["mohanboddu", "plautrba"],
         "packages": ["libselinux", "libsepol"],
     }
     msg = UpdateReadyForTestingV1(
         body={
             "contact": {
                 "name": "BaseOS CI",
                 "team": "BaseOS",
                 "url": "https://somewhere.com",
                 "docs": "https://somewhere.com/user-documentation",
                 "irc": "#baseosci",
                 "email": "*****@*****.**"
             },
             "artifact": {
                 "type":
                 "koji-build-group",
                 "id":
                 "FEDORA-2019-d64d0caab3",
                 "repository":
                 "https://bodhi.fp.o/updates/FEDORA-2019-d64d0caab3",
                 "builds": [{
                     "type": "koji-build",
                     "id": 14546275,
                     "task_id": 14546276,
                     "issuer": "plautrba",
                     "component": "libselinux",
                     "nvr": "libselinux-2.8-6.fc29.x86_64",
                     "scratch": False,
                 }, {
                     "type": "koji-build",
                     "id": 14546278,
                     "task_id": None,
                     "issuer": "plautrba",
                     "component": "libsepol",
                     "nvr": "libsepol-2.8-3.fc29.x86_64",
                     "scratch": False,
                 }],
                 "release":
                 "f29",
             },
             "generated_at": "2019-10-22 13:08:10.222602",
             "version": "0.2.2",
             "agent": "mohanboddu",
         })
     check_message(msg, expected)
Exemple #5
0
 def test_requirements_met_stable_v1(self):
     expected = {
         "topic": "bodhi.update.requirements_met.stable",
         "summary": "FEDORA-2019-f1ca3c00e5 has met stable testing requirements",
         "app_icon": "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url": "https://bodhi.fedoraproject.org/updates/FEDORA-2019-f1ca3c00e5",
         "agent_avatar": None,
         "usernames": ["eclipseo"],
         "packages": ["golang-github-Masterminds-semver"],
         'update': UpdateV1(
             'FEDORA-2019-f1ca3c00e5',
             [BuildV1('golang-github-Masterminds-semver-2.0.0-0.1.20190319git3c92f33.fc29')],
             UserV1('eclipseo'), 'pending', 'testing', ReleaseV1('F29'))
     }
     msg = UpdateRequirementsMetStableV1(
         body={
             'update': {
                 "alias": "FEDORA-2019-f1ca3c00e5",
                 "builds": [{
                     "nvr": "golang-github-Masterminds-semver-2.0.0-0.1.20190319git3c92f33.fc29"
                 }],
                 "release": {"name": "F29"},
                 'request': 'testing',
                 "status": "pending",
                 "user": {"name": "eclipseo"}
             },
         }
     )
     check_message(msg, expected)
Exemple #6
0
 def test_request_testing_v1(self):
     expected = {
         "topic": "bodhi.update.request.testing",
         "summary": "eclipseo submitted FEDORA-2019-f1ca3c00e5 to testing",
         "app_icon": "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url": "https://bodhi.fedoraproject.org/updates/FEDORA-2019-f1ca3c00e5",
         "agent_avatar": (
             "https://seccdn.libravatar.org/avatar/"
             "899e8719059bf1b2d3aba96e3e276f72f24f18a9e1f4fbfa7a331995a628e760"
             "?s=64&d=retro"
         ),
         "usernames": ["eclipseo"],
         "packages": ["golang-github-Masterminds-semver"],
         'update': UpdateV1(
             'FEDORA-2019-f1ca3c00e5',
             [BuildV1('golang-github-Masterminds-semver-2.0.0-0.1.20190319git3c92f33.fc29')],
             UserV1('eclipseo'), 'pending', 'testing', ReleaseV1('F29'))
     }
     msg = UpdateRequestTestingV1(
         body={
             'agent': 'eclipseo',
             'update': {
                 "alias": "FEDORA-2019-f1ca3c00e5",
                 "builds": [{
                     "nvr": "golang-github-Masterminds-semver-2.0.0-0.1.20190319git3c92f33.fc29"
                 }],
                 "release": {"name": "F29"},
                 'request': 'testing',
                 "status": "pending",
                 "user": {"name": "eclipseo"}
             },
         }
     )
     check_message(msg, expected)
Exemple #7
0
 def test_request_revoke_v1(self):
     expected = {
         "topic": "bodhi.update.request.revoke",
         "summary": "lmacken revoked FEDORA-2019-d64d0caab3",
         "app_icon": "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url": "https://bodhi.fedoraproject.org/updates/FEDORA-2019-d64d0caab3",
         "agent_avatar": (
             "https://seccdn.libravatar.org/avatar/"
             "203f6cb95b44b5d38aa21425b066dd522d3e19d8919cf4b339f29e0ea7f03e9b"
             "?s=64&d=retro"
         ),
         "usernames": ['eclipseo', "lmacken"],
         "packages": ["golang-github-SAP-go-hdb"],
         'update': UpdateV1(
             'FEDORA-2019-d64d0caab3', [BuildV1('golang-github-SAP-go-hdb-0.14.1-1.fc29')],
             UserV1('eclipseo'), 'testing', None, ReleaseV1('F29'))
     }
     msg = UpdateRequestRevokeV1(
         body={
             'agent': 'lmacken',
             'update': {
                 "alias": "FEDORA-2019-d64d0caab3",
                 "builds": [{"nvr": "golang-github-SAP-go-hdb-0.14.1-1.fc29"}],
                 "release": {"name": "F29"},
                 'request': None,
                 "status": "testing",
                 "user": {"name": "eclipseo"}
             },
         }
     )
     check_message(msg, expected)
Exemple #8
0
 def test_request_unpush_v1(self):
     """Test a request unpush message."""
     expected = {
         "topic": "bodhi.update.request.unpush",
         "summary": "ralph unpushed FEDORA-2019-8da6360454",
         "app_icon": "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url": "https://bodhi.fedoraproject.org/updates/FEDORA-2019-8da6360454",
         "agent_avatar": (
             "https://seccdn.libravatar.org/avatar/"
             "9c9f7784935381befc302fe3c814f9136e7a33953d0318761669b8643f4df55c"
             "?s=64&d=retro"
         ),
         "usernames": ["ralph"],
         "packages": ["python-operator-courier"],
         'update': UpdateV1(
             'FEDORA-2019-8da6360454', [BuildV1('python-operator-courier-1.2.0-1.fc28')],
             UserV1('ralph'), 'unpushed', None, ReleaseV1('F28'))
     }
     msg = UpdateRequestUnpushV1(
         body={
             'agent': 'ralph',
             'update': {
                 "alias": "FEDORA-2019-8da6360454",
                 "builds": [{'nvr': 'python-operator-courier-1.2.0-1.fc28'}],
                 "release": {"name": "F28"},
                 'request': None,
                 "status": "unpushed",
                 "user": {"name": "ralph"}
             },
         }
     )
     check_message(msg, expected)
Exemple #9
0
 def test_start_v1(self):
     expected = {
         "topic": "bodhi.compose.start",
         "summary": "bodhi composer started a push",
         "app_icon": "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url": None,
         "usernames": ['mohanboddu'],
         "packages": [],
         'agent': 'mohanboddu'
     }
     msg = ComposeStartV1(body={'agent': 'mohanboddu'})
     check_message(msg, expected)
Exemple #10
0
 def test_complete_testing_v1(self):
     expected = {
         "topic":
         "bodhi.update.complete.testing",
         "summary":
         ("eclipseo's golang-github-SAP-go-hdb-0.14.1-1.fc29 t… bodhi update "
          "completed push to testing"),
         "app_icon":
         "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url":
         "https://bodhi.fedoraproject.org/updates/FEDORA-2019-d64d0caab3",
         "agent_avatar":
         ("https://seccdn.libravatar.org/avatar/"
          "20652954adacfd9f6e26536bbcf3b5fbc850dc61f8a2e67c5bfbc6e345032976"
          "?s=64&d=retro"),
         "usernames": ["eclipseo", 'mohanboddu'],
         "packages": ["golang-github-SAP-go-hdb", 'texworks'],
         'update':
         UpdateV1('FEDORA-2019-d64d0caab3', [
             BuildV1('golang-github-SAP-go-hdb-0.14.1-1.fc29'),
             BuildV1('texworks-0.6.3-1.fc29')
         ], UserV1('eclipseo'), 'testing', None, ReleaseV1('F29'))
     }
     msg = UpdateCompleteTestingV1(
         body={
             "update": {
                 "alias":
                 "FEDORA-2019-d64d0caab3",
                 "builds": [{
                     "nvr": "golang-github-SAP-go-hdb-0.14.1-1.fc29"
                 }, {
                     'nvr': 'texworks-0.6.3-1.fc29'
                 }],
                 "title":
                 "fedmsg-0.2.7-2.el6",
                 'release': {
                     "name": "F29"
                 },
                 'request':
                 None,
                 "status":
                 "testing",
                 "user": {
                     "name": "eclipseo"
                 }
             },
             'agent': 'mohanboddu'
         })
     check_message(msg, expected)
Exemple #11
0
 def test_repo_done_v1(self):
     expected = {
         "topic": "bodhi.repo.done",
         "summary": "bodhi composer is finished building test_repo",
         "app_icon": "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url": None,
         "usernames": ['mohanboddu'],
         "packages": [],
         'agent': 'mohanboddu',
         'repo': 'test_repo'
     }
     msg = RepoDoneV1(
         body={'agent': 'mohanboddu', 'repo': 'test_repo', 'path': '/some/path'}
     )
     check_message(msg, expected)
Exemple #12
0
 def test_comment_v1(self):
     expected = {
         "topic": "bodhi.update.comment",
         "summary": "ralph commented on bodhi update FEDORA-EPEL-2019-f2d195dada (karma: -1)",
         "__str__": (
             "Can you believe how much testing we're doing? "
             "/cc @codeblock.\n"
             "Nothing from this e-mail should match the regex: [email protected]"
         ),
         "app_icon": "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url": "https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-f2d195dada",
         "agent_avatar": (
             "https://seccdn.libravatar.org/avatar/"
             "9c9f7784935381befc302fe3c814f9136e7a33953d0318761669b8643f4df55c"
             "?s=64&d=retro"
         ),
         "usernames": ["codeblock", "ralph", "tdawson"],
         "packages": ['abrt-addon-python3', 'asciinema'],
         'karma': -1,
         'user': UserV1('ralph'),
         'update': UpdateV1(
             'FEDORA-EPEL-2019-f2d195dada',
             [BuildV1("abrt-addon-python3-2.1.11-50.el7"), BuildV1("asciinema-1.4.0-2.el7")],
             UserV1('tdawson'), 'pending', 'testing', ReleaseV1('F29')),
         'agent': 'ralph',
     }
     msg = UpdateCommentV1(
         body={
             "comment": {
                 "karma": -1,
                 "text": "Can you believe how much testing we're doing?"
                         " /cc @codeblock.\n"
                         "Nothing from this e-mail should match the regex: [email protected]",
                 "timestamp": "2019-03-18 16:54:48",
                 "update": {
                     "alias": "FEDORA-EPEL-2019-f2d195dada",
                     'builds': [{'nvr': 'abrt-addon-python3-2.1.11-50.el7'},
                                {'nvr': 'asciinema-1.4.0-2.el7'}],
                     'status': 'pending',
                     "release": {"name": "F29"},
                     'request': 'testing',
                     'user': {"name": "tdawson"}},
                 'user': {'name': 'ralph'}
             }
         }
     )
     check_message(msg, expected)
Exemple #13
0
 def test_composing_v1(self):
     expected = {
         "topic": "bodhi.compose.composing",
         "summary": "bodhi composer started composing test_repo",
         "app_icon": "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url": None,
         "usernames": ['mohanboddu'],
         "packages": [],
         'repo': 'test_repo',
         'agent': 'mohanboddu'
     }
     msg = ComposeComposingV1(
         body={
             'agent': 'mohanboddu',
             'repo': 'test_repo',
             'updates': ['monitorix-3.11.0-1.el6'],
         })
     check_message(msg, expected)
Exemple #14
0
 def test_sync_done_v1(self):
     expected = {
         "topic": "bodhi.compose.sync.done",
         "summary": (
             "bodhi composer finished waiting for test_repo "
             "to hit the master mirror"
         ),
         "app_icon": "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url": None,
         "usernames": ['mohanboddu'],
         "packages": [],
         'agent': 'mohanboddu',
         'repo': 'test_repo'
     }
     msg = ComposeSyncDoneV1(
         body={'agent': 'mohanboddu', 'repo': 'test_repo'}
     )
     check_message(msg, expected)
Exemple #15
0
 def test_complete_v1_success(self):
     """Test the ComposeCompleteV1 Message with a successful compose."""
     expected = {
         "topic": "bodhi.compose.complete",
         "summary": "bodhi composer successfully composed test_repo",
         "app_icon": "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url": None,
         "usernames": ['mohanboddu'],
         "packages": [],
         'agent': 'mohanboddu',
         'repo': 'test_repo',
         'success': True,
         'ctype': 'container',
     }
     msg = ComposeCompleteV1(
         body={
             'agent': 'mohanboddu',
             'success': True,
             'repo': 'test_repo',
             'ctype': 'container',
         })
     check_message(msg, expected)
Exemple #16
0
 def test_karma_threshold_v1(self):
     expected = {
         "topic":
         "bodhi.update.karma.threshold.reach",
         "summary":
         "FEDORA-EPEL-2015-0238 reached the stable karma threshold",
         "app_icon":
         "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url":
         "https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-0238",
         "agent_avatar":
         None,
         "usernames": ['ralph'],
         "packages": ["tzdata"],
         'update':
         UpdateV1('FEDORA-EPEL-2015-0238', [BuildV1('tzdata-2014i-1.fc19')],
                  UserV1('ralph'), 'pending', 'testing', ReleaseV1('F19')),
         'status':
         'stable'
     }
     msg = UpdateKarmaThresholdV1(
         body={
             "status": "stable",
             "update": {
                 "close_bugs":
                 True,
                 "pushed":
                 False,
                 "require_testcases":
                 True,
                 "critpath":
                 False,
                 "stable_karma":
                 3,
                 "date_pushed":
                 None,
                 "requirements":
                 "rpmlint",
                 "severity":
                 "unspecified",
                 "title":
                 "tzdata-2014i-1.fc19",
                 "suggest":
                 "unspecified",
                 "require_bugs":
                 True,
                 "comments": [{
                     "bug_feedback": [],
                     "user_id": 1681,
                     "timestamp": "2015-01-28 03:02:44",
                     "testcase_feedback": [],
                     "karma_critpath": 0,
                     "update": 54046,
                     "update_id": 54046,
                     "karma": 0,
                     "anonymous": False,
                     "text": "ralph edited this update. ",
                     "id": 484236,
                     "user": {
                         "buildroot_overrides": [],
                         "name": "bodhi",
                         "avatar": None
                     }
                 }],
                 "date_approved":
                 None,
                 "type":
                 "enhancement",
                 "status":
                 "pending",
                 "date_submitted":
                 "2014-10-29 20:02:57",
                 "unstable_karma":
                 -3,
                 "user": {
                     "buildroot_overrides": [],
                     "name": "ralph",
                     "avatar": None
                 },
                 "locked":
                 False,
                 "builds": [{
                     "override": None,
                     "nvr": "tzdata-2014i-1.fc19"
                 }],
                 "date_modified":
                 "2015-01-28 03:02:55",
                 "notes":
                 "the update notes go here...",
                 "request":
                 "testing",
                 "bugs": [],
                 "alias":
                 "FEDORA-EPEL-2015-0238",
                 "karma":
                 0,
                 "release": {
                     "dist_tag": "f19",
                     "name": "F19",
                     "testing_tag": "f19-updates-testing",
                     "pending_stable_tag": "f19-updates-pending",
                     "long_name": "Fedora 19",
                     "state": "disabled",
                     "version": None,
                     "override_tag": "f19-override",
                     "branch": None,
                     "id_prefix": "FEDORA",
                     "pending_testing_tag": "f19-updates-testing-pending",
                     "stable_tag": "f19-updates",
                     "candidate_tag": "f19-updates-candidate"
                 }
             }
         })
     check_message(msg, expected)
Exemple #17
0
 def test_edit_v1(self):
     expected = {
         "topic":
         "bodhi.update.edit",
         "summary":
         "ralph edited FEDORA-2019-7dbbb74a13",
         "app_icon":
         "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url":
         "https://bodhi.fedoraproject.org/updates/FEDORA-2019-7dbbb74a13",
         "agent_avatar":
         ("https://seccdn.libravatar.org/avatar/"
          "9c9f7784935381befc302fe3c814f9136e7a33953d0318761669b8643f4df55c"
          "?s=64&d=retro"),
         "new_bugs": [1708925, 1706626],
         "usernames": ["ralph"],
         "packages": ["tzdata"],
         'update':
         UpdateV1('FEDORA-2019-7dbbb74a13',
                  [BuildV1('tzdata-2014i-1.fc19')], UserV1('ralph'),
                  'pending', 'testing', ReleaseV1('F19'))
     }
     msg = UpdateEditV1(
         body={
             "new_bugs": [1708925, 1706626],
             "update": {
                 "close_bugs":
                 True,
                 "pushed":
                 False,
                 "require_testcases":
                 True,
                 "critpath":
                 False,
                 "stable_karma":
                 3,
                 "date_pushed":
                 None,
                 "requirements":
                 "rpmlint",
                 "severity":
                 "unspecified",
                 "title":
                 "tzdata-2014i-1.fc19",
                 "suggest":
                 "unspecified",
                 "require_bugs":
                 True,
                 "comments": [{
                     "bug_feedback": [],
                     "user_id": 1681,
                     "timestamp": "2015-01-28 03:02:44",
                     "testcase_feedback": [],
                     "karma_critpath": 0,
                     "update": 54046,
                     "update_id": 54046,
                     "karma": 0,
                     "anonymous": False,
                     "text": "ralph edited this update. ",
                     "id": 484236,
                     "user": {
                         "buildroot_overrides": [],
                         "name": "bodhi",
                         "avatar": None
                     }
                 }],
                 "date_approved":
                 None,
                 "type":
                 "enhancement",
                 "status":
                 "pending",
                 "date_submitted":
                 "2014-10-29 20:02:57",
                 "unstable_karma":
                 -3,
                 "user": {
                     "buildroot_overrides": [],
                     "name": "ralph",
                     "avatar": None
                 },
                 "locked":
                 False,
                 "builds": [{
                     "override": None,
                     "nvr": "tzdata-2014i-1.fc19"
                 }],
                 "date_modified":
                 "2015-01-28 03:02:55",
                 "notes":
                 "the update notes go here...",
                 "request":
                 "testing",
                 "bugs": [],
                 "alias":
                 'FEDORA-2019-7dbbb74a13',
                 "karma":
                 0,
                 "release": {
                     "dist_tag": "f19",
                     "name": "F19",
                     "testing_tag": "f19-updates-testing",
                     "pending_stable_tag": "f19-updates-pending",
                     "long_name": "Fedora 19",
                     "state": "disabled",
                     "version": None,
                     "override_tag": "f19-override",
                     "branch": None,
                     "id_prefix": "FEDORA",
                     "pending_testing_tag": "f19-updates-testing-pending",
                     "stable_tag": "f19-updates",
                     "candidate_tag": "f19-updates-candidate"
                 }
             },
             "agent": "ralph"
         })
     check_message(msg, expected)
Exemple #18
0
 def test_request_testing_v1_multiple(self):
     expected = {
         "topic":
         "bodhi.update.request.testing",
         "summary":
         "lmacken submitted FEDORA-2019-f1ca3c00e5 to testing",
         "app_icon":
         "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url":
         "https://bodhi.fedoraproject.org/updates/FEDORA-2019-f1ca3c00e5",
         "agent_avatar":
         ("https://seccdn.libravatar.org/avatar/"
          "203f6cb95b44b5d38aa21425b066dd522d3e19d8919cf4b339f29e0ea7f03e9b"
          "?s=64&d=retro"),
         "usernames": ["hadess", "lmacken"],
         "packages": ["gnome-settings-daemon", "control-center"],
         'update':
         UpdateV1('FEDORA-2019-f1ca3c00e5', [
             BuildV1('gnome-settings-daemon-3.6.1-1.fc18'),
             BuildV1('control-center-3.6.1-1.fc18')
         ], UserV1('hadess'), 'pending', 'testing', ReleaseV1('F18'))
     }
     msg = UpdateRequestTestingV1(
         body={
             'agent': 'lmacken',
             "update": {
                 'alias':
                 'FEDORA-2019-f1ca3c00e5',
                 "status":
                 "pending",
                 "critpath":
                 False,
                 "stable_karma":
                 3,
                 "date_pushed":
                 None,
                 'user': {
                     'name': 'hadess'
                 },
                 "title": ("gnome-settings-daemon-3.6.1-1.fc18,"
                           "control-center-3.6.1-1.fc18"),
                 "comments": [{
                     "group":
                     None,
                     "author":
                     "bodhi",
                     "text":
                     "This update has been submitted for "
                     "testing by hadess. ",
                     "karma":
                     0,
                     "anonymous":
                     False,
                     "timestamp":
                     1349718539.0,
                     "update_title": ("gnome-settings-daemon-3.6.1-1.fc18,"
                                      "control-center-3.6.1-1.fc18")
                 }],
                 "type":
                 "bugfix",
                 "close_bugs":
                 True,
                 "date_submitted":
                 1349718534.0,
                 "unstable_karma":
                 -3,
                 "release": {
                     "dist_tag": "f18",
                     "locked": True,
                     "long_name": "Fedora 18",
                     "name": "F18",
                     "id_prefix": "FEDORA"
                 },
                 "builds": [{
                     "nvr": "gnome-settings-daemon-3.6.1-1.fc18",
                     "package": {
                         "suggest_reboot":
                         False,
                         "committers":
                         ["hadess", "ofourdan", "mkasik", "cosimoc"],
                         "name":
                         "gnome-settings-daemon"
                     }
                 }, {
                     "nvr": "control-center-3.6.1-1.fc18",
                     "package": {
                         "suggest_reboot":
                         False,
                         "committers": [
                             "ctrl-center-team", "ofourdan", "ssp", "ajax",
                             "alexl", "jrb", "mbarnes", "caolanm", "davidz",
                             "mclasen", "rhughes", "hadess", "johnp",
                             "caillon", "whot", "rstrode"
                         ],
                         "name":
                         "control-center"
                     }
                 }],
                 "date_modified":
                 None,
                 "notes": (
                     "This update fixes numerous bugs in the new Input "
                     "Sources support, the Network panel and adds a help "
                     "screen accessible via Wacom tablets's buttons."),
                 "request":
                 "testing",
                 "bugs": [],
                 "critpath_approved":
                 False,
                 "karma":
                 0,
             }
         })
     check_message(msg, expected)
Exemple #19
0
 def test_publish_v1(self):
     """Test an ErrataPublishV1."""
     expected = {
         "topic":
         "bodhi.errata.publish",
         "summary":
         "This is the subject of the errata email",
         "__str__":
         "This is the body of the errata email",
         "app_icon":
         "https://apps.fedoraproject.org/img/icons/bodhi.png",
         "url":
         "https://bodhi.fedoraproject.org/updates/FEDORA-2019-4cc36fafbb",
         "agent_avatar":
         ('https://seccdn.libravatar.org/avatar/'
          'a9bfa08eb2cdbfc3f0c22150b53985ea4489d288d9618b53b7d039c44e0f829d?s=64&d=retro'
          ),
         "usernames": ['test_submitter'],
         "packages": ["tzdata"],
         'agent':
         'test_submitter',
         'update':
         UpdateV1("FEDORA-2019-4cc36fafbb",
                  [BuildV1('tzdata-2014i-1.fc19')],
                  UserV1('test_submitter'), 'pending', 'testing'),
     }
     msg = ErrataPublishV1(
         body={
             "subject": "This is the subject of the errata email",
             "body": "This is the body of the errata email",
             "update": {
                 "alias":
                 "FEDORA-2019-4cc36fafbb",
                 "close_bugs":
                 True,
                 "old_updateid":
                 None,
                 "pushed":
                 False,
                 "require_testcases":
                 True,
                 "critpath":
                 False,
                 "stable_karma":
                 3,
                 "date_pushed":
                 None,
                 "severity":
                 "unspecified",
                 "title":
                 "tzdata-2014i-1.fc19",
                 "suggest":
                 "unspecified",
                 "require_bugs":
                 True,
                 "comments": [{
                     "bug_feedback": [],
                     "user_id": 1681,
                     "timestamp": "2015-01-28 03:02:44",
                     "testcase_feedback": [],
                     "karma_critpath": 0,
                     "update": 54046,
                     "update_id": 54046,
                     "karma": 0,
                     "anonymous": False,
                     "text": "ralph edited this update. ",
                     "id": 484236,
                     "user": {
                         "buildroot_overrides": [],
                         "stacks": [],
                         "name": "bodhi",
                         "avatar": None
                     }
                 }],
                 "date_approved":
                 None,
                 "type":
                 "enhancement",
                 "status":
                 "pending",
                 "date_submitted":
                 "2014-10-29 20:02:57",
                 "unstable_karma":
                 -3,
                 "user": {
                     "buildroot_overrides": [],
                     "stacks": [
                         {
                             "requirements": "depcheck upgradepath",
                             "description": "This stack is so hack!",
                             "name": "Hackey",
                             "groups": [],
                             "packages": [],
                             "users": [1711]
                         },
                     ],
                     "name":
                     "test_submitter",
                     "avatar":
                     None
                 },
                 "locked":
                 False,
                 "builds": [{
                     "override": None,
                     "nvr": "tzdata-2014i-1.fc19"
                 }],
                 "date_modified":
                 "2015-01-28 03:02:55",
                 "notes":
                 "the update notes go here...",
                 "request":
                 "testing",
                 "bugs": [],
                 "karma":
                 0,
                 "release": {
                     "dist_tag": "f19",
                     "name": "F19",
                     "testing_tag": "f19-updates-testing",
                     "pending_stable_tag": "f19-updates-pending",
                     "long_name": "Fedora 19",
                     "state": "disabled",
                     "version": None,
                     "override_tag": "f19-override",
                     "branch": None,
                     "id_prefix": "FEDORA",
                     "pending_testing_tag": "f19-updates-testing-pending",
                     "stable_tag": "f19-updates",
                     "candidate_tag": "f19-updates-candidate"
                 }
             }
         })
     check_message(msg, expected)