witten
/
luminotes
Archived
1
0
Fork 0

Whoops, forgot to remove titles_only search flag from unit tests.

This commit is contained in:
Dan Helfman 2007-09-28 22:59:44 +00:00
parent 31750d0040
commit ca60ffd1b3
1 changed files with 2 additions and 42 deletions

View File

@ -1335,7 +1335,7 @@ class Test_notebooks( Test_controller ):
note2 = result.get( "note" )
assert note2.object_id == self.note2.object_id
def test_search_titles_without_titles_only( self ):
def test_search_titles( self ):
self.login()
search_text = u"other"
@ -1343,7 +1343,6 @@ class Test_notebooks( Test_controller ):
result = self.http_post( "/notebooks/search/", dict(
notebook_id = self.notebook.object_id,
search_text = search_text,
titles_only = False,
), session_id = self.session_id )
notes = result.get( "notes" )
@ -1351,7 +1350,7 @@ class Test_notebooks( Test_controller ):
assert len( notes ) == 1
assert notes[ 0 ].object_id == self.note2.object_id
def test_search_contents_without_titles_only( self ):
def test_search_contents( self ):
self.login()
search_text = u"bla"
@ -1359,7 +1358,6 @@ class Test_notebooks( Test_controller ):
result = self.http_post( "/notebooks/search/", dict(
notebook_id = self.notebook.object_id,
search_text = search_text,
titles_only = False,
), session_id = self.session_id )
notes = result.get( "notes" )
@ -1367,44 +1365,12 @@ class Test_notebooks( Test_controller ):
assert len( notes ) == 1
assert notes[ 0 ].object_id == self.note.object_id
def test_search_titles_with_titles_only( self ):
self.login()
search_text = u"other"
result = self.http_post( "/notebooks/search/", dict(
notebook_id = self.notebook.object_id,
search_text = search_text,
titles_only = True,
), session_id = self.session_id )
notes = result.get( "notes" )
assert len( notes ) == 1
assert notes[ 0 ].object_id == self.note2.object_id
def test_search_contents_with_titles_only( self ):
self.login()
search_text = u"bla"
result = self.http_post( "/notebooks/search/", dict(
notebook_id = self.notebook.object_id,
search_text = search_text,
titles_only = True,
), session_id = self.session_id )
notes = result.get( "notes" )
assert len( notes ) == 0
def test_search_without_login( self ):
search_text = u"bla"
result = self.http_post( "/notebooks/search/", dict(
notebook_id = self.notebook.object_id,
search_text = search_text,
titles_only = True,
), session_id = self.session_id )
assert result.get( "error" )
@ -1417,7 +1383,6 @@ class Test_notebooks( Test_controller ):
result = self.http_post( "/notebooks/search/", dict(
notebook_id = self.notebook.object_id,
search_text = search_text,
titles_only = False,
), session_id = self.session_id )
notes = result.get( "notes" )
@ -1433,7 +1398,6 @@ class Test_notebooks( Test_controller ):
result = self.http_post( "/notebooks/search/", dict(
notebook_id = self.notebook.object_id,
search_text = search_text,
titles_only = True,
), session_id = self.session_id )
notes = result.get( "notes" )
@ -1448,7 +1412,6 @@ class Test_notebooks( Test_controller ):
result = self.http_post( "/notebooks/search/", dict(
notebook_id = self.notebook.object_id,
search_text = search_text,
titles_only = True,
), session_id = self.session_id )
notes = result.get( "notes" )
@ -1470,7 +1433,6 @@ class Test_notebooks( Test_controller ):
result = self.http_post( "/notebooks/search/", dict(
notebook_id = self.notebook.object_id,
search_text = search_text,
titles_only = False,
), session_id = self.session_id )
notes = result.get( "notes" )
@ -1487,7 +1449,6 @@ class Test_notebooks( Test_controller ):
result = self.http_post( "/notebooks/search/", dict(
notebook_id = self.notebook.object_id,
search_text = search_text,
titles_only = True,
), session_id = self.session_id )
notes = result.get( "notes" )
@ -1505,7 +1466,6 @@ class Test_notebooks( Test_controller ):
result = self.http_post( "/notebooks/search/", dict(
notebook_id = self.notebook.object_id,
search_text = search_text,
titles_only = True,
), session_id = self.session_id )
notes = result.get( "notes" )