def test_second_book(self): authors = set(text_type(x.key.id()) for x in fill_authors(Author)) authors.add('__None') form = model_form(second_ndb_module.SecondBook) keys = set() for key, b, c in form().author.iter_choices(): keys.add(key)
def test_book(self): authors = set(x.key.urlsafe() for x in fill_authors(Author)) authors.add('__None') form = model_form(Book) keys = set() for key, b, c in form().author.iter_choices(): keys.add(key) self.assertEqual(authors, keys)
def test_book(self): authors = set(text_type(x.key.id()) for x in fill_authors(Author)) authors.add("__None") form = model_form(Book) keys = set() for key, b, c in form().author.iter_choices(): keys.add(key) self.assertEqual(authors, keys)
def setUp(self): self.authors = fill_authors(Author) self.author_names = set(x.name for x in self.authors) self.author_ages = set(x.age for x in self.authors)
def setUp(self): super(TestKeyPropertyField, self).setUp() self.authors = fill_authors(Author) self.first_author_key = self.authors[0].key
def setUp(self): super(TestRepeatedKeyPropertyField, self).setUp() self.authors = fill_authors(Author) self.first_author_key = self.authors[0].key self.second_author_key = self.authors[1].key
def setUp(self): self.authors = fill_authors(Author) self.first_author_id = self.authors[0].key.id()
def setUp(self): super(TestReferencePropertyField, self).setUp() self.authors = fill_authors(Author) self.author_names = set(x.name for x in self.authors) self.author_ages = set(x.age for x in self.authors)