Esempio n. 1
0
    def test_search_objects(self):
        #community = TestFactory.createCommunity()
        #user1 = TestFactory.createUserOne(community)
        #user2 = TestFactory.createUserTwo(community)
        #shed = TestFactory.createShed(user1, community)
        tool = TestFactory.createTool()

        # Create a new request
        request = HTTPRequestSearch()

        # A user searches for "Hamm". Hammer should come up.
        request.user = tool.owner
        request.GET['q'] = "Hamm"

        # Search and make sure the response has a "Hammer" result.
        resp = search_objects(request)
        self.assertContains("Hammer", resp.content.decode("utf-8"))
Esempio n. 2
0
 def setUp(self):
     TestFactory.setUpAll()
Esempio n. 3
0
 def setUp(self):
     testfactory = TestFactory()
     testfactory.setUpAll()