示例#1
0
文件: test_bugs.py 项目: pyoor/Bugsy
def test_we_cant_add_attachment_without_id(attachment_return):
    bug = Bug()
    attachment = Attachment(None, **attachment_return['bugs']['1017315'][0])

    try:
        bug.add_attachment(attachment)
    except BugException as e:
        assert str(
            e
        ) == "Message: Cannot add an attachment without a bug id Code: None"