From ca60ffd1b3f36c0eba21cf2546764fe1a6dd9476 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 28 Sep 2007 22:59:44 +0000 Subject: [PATCH] Whoops, forgot to remove titles_only search flag from unit tests. --- controller/test/Test_notebooks.py | 44 ++----------------------------- 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/controller/test/Test_notebooks.py b/controller/test/Test_notebooks.py index a3c3a57..64a7efc 100644 --- a/controller/test/Test_notebooks.py +++ b/controller/test/Test_notebooks.py @@ -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" )