Code Monkey home page Code Monkey logo

Comments (2)

vanschelven avatar vanschelven commented on June 11, 2024

The most recent version of the code, i.e. #6789ab6e24382da508b0369b37e0caa521decd99 still fails the tests, though the "fixes" mentioned above no longer work either.

Steps to reproduce:

  • Install stock version of Django 1.3
  • Install Django-axes from Master

Setup a test environment. I'm using an environment like this:
vanschelven@20e5a06

I would be a proponent of adding such an environment to the main line as well, so we can all run the same tests and communicate more clearly about what's going right/wrong.

from django-axes.

vanschelven avatar vanschelven commented on June 11, 2024

For further debugging purposes: I've slightly adapted the tests to show the response that doesn't contain the searched-for string, i.e. self.assertTrue("Account locked" in response, response). The result of one failing test is shown below. Notable: the fact that there's a complaint about an expired session in there.

======================================================================
FAIL: test_with_real_username_max_with_more (axes.tests.AccessAttemptTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/cleanenv/lib/python2.6/site-packages/axes/tests.py", line 68, in test_with_real_username_max_with_more
    self.test_login_max_with_more(correct_username=True)
  File "/tmp/cleanenv/lib/python2.6/site-packages/axes/tests.py", line 62, in test_login_max_with_more
    self.assertTrue("Account locked" in response, response)
AssertionError: False is not True : Last-Modified: Fri, 22 Jun 2012 14:53:29 GMT
Expires: Fri, 22 Jun 2012 14:53:29 GMT
Content-Type: text/html; charset=utf-8
Vary: Cookie
Cache-Control: max-age=0

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us" >
<head>
<title>Log in | Django site admin</title>
<link rel="stylesheet" type="text/css" href="/static/admin/css/base.css" />
<link rel="stylesheet" type="text/css" href="/static/admin/css/login.css" />
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="/static/admin/css/ie.css" /><![endif]-->

<script type="text/javascript">window.__admin_media_prefix__ = "/static/admin/";</script>

<meta name="robots" content="NONE,NOARCHIVE" />
</head>


<body class="login">

<!-- Container -->
<div id="container">


    <!-- Header -->
    <div id="header">
        <div id="branding">

<h1 id="site-name">Django administration</h1>

        </div>


    </div>
    <!-- END Header -->





    <!-- Content -->
    <div id="content" class="colM">







<p class="errornote">
    Please enter a correct username and password. Note that both fields are case-sensitive.
</p>

<p class="errornote">
    Please log in again, because your session has expired.
</p>



<div id="content-main">
<form action="/admin/" method="post" id="login-form"><div style='display:none'><input type='hidden' name='csrfmiddlewaretoken' value='ac4695e774612d5c2f6ecea8efe2b544' /></div>
  <div class="form-row">

    <label for="id_username" class="required">Username:</label> <input id="id_username" type="text" name="username" value="whywouldyouohwhy0.013372393866" maxlength="30" />
  </div>
  <div class="form-row">

    <label for="id_password" class="required">Password:</label> <input type="password" name="password" id="id_password" />
    <input type="hidden" name="this_is_the_login_form" value="1" />
    <input type="hidden" name="next" value="/admin/" />
  </div>
  <div class="submit-row">
    <label>&nbsp;</label><input type="submit" value="Log in" />
  </div>
</form>

<script type="text/javascript">
document.getElementById('id_username').focus()
</script>
</div>


        <br class="clear" />
    </div>
    <!-- END Content -->

    <div id="footer"></div>
</div>
<!-- END Container -->

</body>
</html>


----------------------------------------------------------------------
Ran 4 tests in 0.419s

FAILED (failures=4)

from django-axes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.