def test_substring(self): assert_that(User.search_by_string('doe').count(), equal_to(2))
def test_deleted(self): self.u1.deleted = True assert_that(User.search_by_string('John').count(), equal_to(1)) assert_that(User.search_by_string('Doe').count(), equal_to(1))
def test_firstname_and_lastname_reversed(self): assert_that(User.search_by_string('doesr johnsr').count(), equal_to(1))
def test_lastname(self): assert_that(User.search_by_string('doesr').count(), equal_to(1))
def test_firstname(self): assert_that(User.search_by_string('johnsr').count(), equal_to(1))
def test_username(self): assert_that(User.search_by_string('edoed').count(), equal_to(1))
def test_email(self): assert_that(User.search_by_string('john@john').count(), equal_to(1))