Exemplo n.º 1
0
    def testFormValidation(self):

        prefix = "%s/%s/" % (settings.DOMAIN, urls["PERSON"])

        form = ReportPersonDuplicateForm(
            {"objectA": "http://" + prefix + self.p1.permalink, "objectB": "http://" + prefix + self.p2.permalink}
        )
        self.assertTrue(form.is_valid())

        form = ReportPersonDuplicateForm({"objectA": "http://legia.com", "objectB": "http://google.pl"})
        self.assertFalse(form.is_valid())
Exemplo n.º 2
0
    def testFormValidation( self ):

        prefix = '%s/%s/' % ( settings.DOMAIN, urls['PERSON'] )

        form = ReportPersonDuplicateForm({ 
            'objectA': 'http://' + prefix + self.p1.permalink, 
            'objectB': 'http://' + prefix + self.p2.permalink 
        })
        self.assertTrue( form.is_valid() )

        form = ReportPersonDuplicateForm({ 
            'objectA': 'http://legia.com', 
            'objectB': 'http://google.pl' 
        })
        self.assertFalse( form.is_valid() )
Exemplo n.º 3
0
 def testFormValidation(self):
     form = ReportPersonDuplicateForm({"personA": self.p1.permalink, "personB": self.p2.permalink})
     self.assertFalse(form.is_valid())