Пример #1
0
 def test_external_id_exists(self):
     self.assertTrue(Plate.external_id_exists('Test plate 1'))
     self.assertFalse(Plate.external_id_exists('This is a new name'))
Пример #2
0
 def get(self):
     new_name = self.get_argument('new-name')
     status = 200 if Plate.external_id_exists(new_name) else 404
     self.set_status(status)
     self.finish()