Esempio n. 1
0
 def test_unique_identifier(self):
     a = identifier()
     b = identifier()
     self.assertIsNotNone(re.match("\d{6}-\d{6}-\d{4}$", a))
     self.assertIsNotNone(re.match("\d{6}-\d{6}-\d{4}$", b))
     self.assertNotEqual(a, b)
     self.assertIsNotNone(re.match("asdf-\d{6}-\d{6}-\d{4}$", identifier("asdf")))
Esempio n. 2
0
    def check_behaviour(self):
        if self.default is not None and self.get_value() != self.default:
            raise CheckEqualError(self.default, self.get_value(), "textbox default value:")

        i = unique.identifier()
        self.send_keys(i)

        if self.get_value() != i:
            raise CheckEqualError(i, self.get_value(), "textbox changed value:")
Esempio n. 3
0
 def run(self):
     while len(self.unique_identifiers) < self.n_requests:
         self.unique_identifiers += [identifier()]