示例#1
0
    def test_can_add_fact(self):
        item = ReviewDAO("uuid", "http://www.globo.com")

        item.add_fact('some.fact', 'value')

        expect(item.facts).to_length(1)
        expect(item.facts['some.fact']).to_be_like({
            'key': 'some.fact',
            'value': 'value',
        })
示例#2
0
    def test_can_add_fact(self):
        item = ReviewDAO("uuid", "http://www.globo.com")

        item.add_fact('some.fact', 'value')

        expect(item.facts).to_length(1)
        expect(item.facts['some.fact']).to_be_like({
            'key': 'some.fact',
            'value': 'value',
        })
示例#3
0
    def test_can_add_violation(self):
        item = ReviewDAO("uuid", "http://www.globo.com")

        item.add_violation('some.violation', 'value', 200)

        expect(item.violations).to_length(1)
        expect(item.violations[0]).to_be_like({
            'key': 'some.violation',
            'value': 'value',
            'points': 200
        })
示例#4
0
    def test_can_add_violation(self):
        item = ReviewDAO("uuid", "http://www.globo.com")

        item.add_violation('some.violation', 'value', 200)

        expect(item.violations).to_length(1)
        expect(item.violations[0]).to_be_like({
            'key': 'some.violation',
            'value': 'value',
            'points': 200
        })
示例#5
0
    def test_can_create_dao(self):
        item = ReviewDAO("uuid", "http://www.globo.com")

        expect(item.page_uuid).to_equal("uuid")
        expect(item.page_url).to_equal("http://www.globo.com")
        expect(item.facts).to_be_empty()
        expect(item.violations).to_be_empty()