Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 996385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:52:08+00:00 2026-05-16T06:52:08+00:00

I’m confused why my tests won’t pass for the Django-lean module. ====================================================================== ERROR: testIntegrationWithRegisteredUser

  • 0

I’m confused why my tests won’t pass for the Django-lean module.

======================================================================
ERROR: testIntegrationWithRegisteredUser (django_lean.experiments.tests.test_tags.ExperimentTagsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/django_lean-0.15-py2.7.egg/django_lean/experiments/tests/test_tags.py", line 55, in testIntegrationWithRegisteredUser
    client_factory=create_registered_user_client)
  File "/usr/local/lib/python2.7/site-packages/django_lean-0.15-py2.7.egg/django_lean/experiments/tests/test_tags.py", line 71, in doTestIntegration
    response = client.get(confirm_human_url)
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/test/client.py", line 290, in get
    response = self.request(**r)
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/test/client.py", line 230, in request
    response = self.handler(environ)
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/test/client.py", line 74, in __call__
    response = self.get_response(request)
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/core/handlers/base.py", line 142, in get_response
    return self.handle_uncaught_exception(request, resolver, exc_info)
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/core/handlers/base.py", line 181, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/views/defaults.py", line 24, in server_error
    return http.HttpResponseServerError(t.render(Context({})))
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/template/__init__.py", line 173, in render
    return self._render(context)
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/test/utils.py", line 29, in instrumented_test_render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/template/__init__.py", line 796, in render
    bits.append(self.render_node(node, context))
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/template/__init__.py", line 809, in render_node
    return node.render(context)
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/template/loader_tags.py", line 125, in render
    return compiled_parent._render(context)
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/test/utils.py", line 29, in instrumented_test_render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/template/__init__.py", line 796, in render
    bits.append(self.render_node(node, context))
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/template/__init__.py", line 809, in render_node
    return node.render(context)
  File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/template/defaulttags.py", line 378, in render
    raise e
NoReverseMatch: Reverse for 'opensearch' with arguments '()' and keyword arguments '{}' not found.

----------------------------------------------------------------------
Ran 1 test in 1736.834s

Here is the test:
class ExperimentTagsTest(TestCase):
urls = ‘django_lean.experiments.tests.urls’

def setUp(self):
    self.experiment = Experiment(name="test_experiment")
    self.experiment.save()
    self.experiment.state = Experiment.ENABLED_STATE
    self.experiment.save()

    self.other_experiment = Experiment(name="other_test_experiment")
    self.other_experiment.save()
    self.other_experiment.state = Experiment.ENABLED_STATE
    self.other_experiment.save()
    self.mox = mox.Mox()


def testIntegrationWithRegisteredUser(self):
    def create_registered_user_client(i):
        user = User(username="user%s" % i, email="user%s@example.com" % i)
        user.set_password("password")
        user.save()

        client = Client()

        if not client.login(username=user.username, password="password"):
            raise Exception("login failure")
        return client
    self.doTestIntegration(
        url=reverse('django_lean.experiments.tests.views.experiment_test',
                    args=[self.experiment.name]),
        client_factory=create_registered_user_client)

def doTestIntegration(self, url, client_factory):
    confirm_human_url = reverse('django_lean.experiments.views.confirm_human')
    # confirm_human_url set to '/main-app/confirm_human/' during test
    found_control = False
    found_test = False
    for i in range(100):
        client = client_factory(i)
        import pdb; pdb.set_trace()
        response = client.get(confirm_human_url) # this is where the Client can't find the url
        self.assertEquals(204, response.status_code)
        response = client.get(url)
        self.assertEquals(200, response.status_code)
        in_test = "test" in response.content.lower()
        in_control = "control" in response.content.lower()
        self.assertTrue(in_test != in_control)
        found_control = found_control or in_control
        found_test = found_test or in_test

    self.assertTrue(found_control)
    self.assertTrue(found_test)

This is the View, django_lean.experiments.views.confirm_human

@never_cache
def confirm_human(request):
    experiment_user = WebUser(request)
    experiment_user.confirm_human()
    return HttpResponse(status=204)

Finally, this is the URL patterns from django_lean.experiments.urls :

urlpatterns = patterns('django_lean.experiments.views',  
    url(r'^goal/(?P<goal_name>.*)$', 'record_experiment_goal'), 
    url(r'^confirm_human/$', 'confirm_human')  
)

I don’t understand why the client.get request can’t be followed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T06:52:09+00:00Added an answer on May 16, 2026 at 6:52 am

    Update Couldn’t find any reference to opensearch in Django-lean source. Are you using a Django opensearch plugin or is some other app referring to opensearch? Try searching for opensearch in your project.

    Original Answer

    At first blush it seems that one of the templates is using an {% url %} tag with argument opensearch. At least that is what I suspect based on the following lines in the error trace.

      File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/template/__init__.py", line 809, in render_node
        return node.render(context)
      File "/usr/local/lib/python2.7/site-packages/Django-1.2.1-py2.7.egg/django/template/defaulttags.py", line 378, in render
        raise e
    

    I am not familiar with Django-lean but I think it will be worrh checking if they have an URL named opensearch.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.