示例#1
0
def test_fakeserver_removeComment():
    s = FakeConfluenceServer()
    aid = '917540'
    comment = s.getComment(aid)
    assert isinstance(comment , dict )
    assert s.removeComment(aid) == True
    assert s.getComment(aid) == None
    assert s.removeComment(aid) == False
示例#2
0
def test_fakeserver_removeComment():
    s = FakeConfluenceServer()
    aid = '917540'
    comment = s.getComment(aid)
    assert isinstance(comment, dict)
    assert s.removeComment(aid) == True
    assert s.getComment(aid) == None
    assert s.removeComment(aid) == False
示例#3
0
def test_fakeserver_getComment():
    s = FakeConfluenceServer()
    aid = '917540'
    comment = s.getComment(aid)
    assert isinstance(comment , dict )
    assert len(comment) > 0
    assert 'id' in comment
示例#4
0
def test_fakeserver_getComment():
    s = FakeConfluenceServer()
    aid = '917540'
    comment = s.getComment(aid)
    assert isinstance(comment, dict)
    assert len(comment) > 0
    assert 'id' in comment
示例#5
0
def test_fakeserver_editComment():
    s = FakeConfluenceServer()
    aid = '917540'
    comment = s.getComment(aid)
    assert isinstance(comment , dict )
    c2 = copy.deepcopy(comment)
    new_comment = dict(c2, content= "Edited content moy bueno.")
    updated = s.editComment(new_comment)
    assert updated['content'] == "Edited content moy bueno."
    assert updated['id'] == '917540'
    assert updated['creator'] == 'scholer'
示例#6
0
def test_fakeserver_editComment():
    s = FakeConfluenceServer()
    aid = '917540'
    comment = s.getComment(aid)
    assert isinstance(comment, dict)
    c2 = copy.deepcopy(comment)
    new_comment = dict(c2, content="Edited content moy bueno.")
    updated = s.editComment(new_comment)
    assert updated['content'] == "Edited content moy bueno."
    assert updated['id'] == '917540'
    assert updated['creator'] == 'scholer'