Add basic test for the Assignee model (#621)

This commit is contained in:
Yun Seob Lee 2019-07-02 14:52:08 -04:00 коммит произвёл Marco
Родитель d53430c79e
Коммит 259088cce8
1 изменённых файлов: 17 добавлений и 0 удалений

17
tests/test_assignee.py Normal file
Просмотреть файл

@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from bugbug.models import assignee
from bugbug.models.assignee import AssigneeModel
def test_get_assignee_labels():
assignee.MINIMUM_ASSIGNMENTS = 1
model = AssigneeModel()
classes, _ = model.get_labels()
assert len(classes) != 0
assert classes[1320039] == "gijskruitbosch+bugs@gmail.com"
assert classes[1045018] == "padenot@mozilla.com"
assert 1319973 not in classes