Esempio n. 1
0
    def test_reviewers_cant_make_evaluations(self):
        u = User()
        u.username = '******'
        u.set_password('goscience')
        u.save()
        c = Client()
        logged_in = c.login(username='******', password='******')

        self.assertTrue(logged_in)

        # attempt to edit evaluation

        r = Reviewer()
        r.user = u
        r.name = 'Foo'
        r.affiliation = 'COS'
        r.email = '*****@*****.**'
        r.bio = 'Interested in opening up the sciences.'
        r.research = 'Metascience'
        r.website = 'http://cos.io'
        r.osfreviews = 0
        r.save()

        ev = Evaluation()
        ev.status = 'Pending'
        ev.progress = 'Received'
        ev.premise = 5
        ev.research = 6
        ev.style = 4
        ev.comment = 'This is a comment.'

        ev.reviewer = r
        ev.submission = Submission.objects.first()
        ev.save()
Esempio n. 2
0
    def test_reviewers_can_edit_evaluations(self):
        u = User()
        u.username = '******'
        u.set_password('goscience')
        u.save()
        c = Client()
        logged_in = c.login(username='******', password='******')

        self.assertTrue(logged_in)

        # attempt to edit evaluation

        r = Reviewer()
        r.user = u
        r.name = 'Foo'
        r.affiliation = 'COS'
        r.email = '*****@*****.**'
        r.bio = 'Interested in opening up the sciences.'
        r.research = 'Metascience'
        r.website = 'http://cos.io'
        r.osfreviews = 0
        r.save()

        e = Evaluation.objects.first()
        e.comment = 'This is an update to the comment'
        e.save()
Esempio n. 3
0
    def setUp(self):

        u = User()
        u.username = '******'
        u.save()

        r = Reviewer()
        r.user = u
        r.name = 'Luke'
        r.affiliation = 'COS'
        r.email = '*****@*****.**'
        r.bio = 'I love to have fun.'
        r.research = 'Fun Facts'
        r.website = 'http://lukemarsh.com'
        r.osfreviews = 0
        r.save()

        s = Submission()
        s.conference = 'FooCon'
        s.title = 'Effects of Foo on Bar'
        s.reviewdeadline = datetime.date(2016, 12, 25).isoformat()
        s.authorname = 'Foo Bar'
        s.authoremail = '*****@*****.**'
        s.status = 'Awaiting review'
        s.link = 'http://foobar.org'
        s.attachment = '/foo/bar.pdf'
        s.save()

        s.reviewer.add(r)
        s.save()

        u2 = User()
        u2.username = '******'
        u2.save()

        ed = Editor()
        ed.user = u2
        ed.name = 'Tom Heatwole'
        ed.email = '*****@*****.**'
        ed.save()

        s.editor = ed
        s.save()

        ev = Evaluation()
        ev.status = 'Pending'
        ev.progress = 'Received'
        ev.premise = 5
        ev.research = 6
        ev.style = 4
        ev.comment = 'This is a comment.'

        ev.reviewer = r
        ev.submission = s
        ev.save()