Skip to content

Commit

Permalink
fixed all failing tests but one
Browse files Browse the repository at this point in the history
  • Loading branch information
PirosB3 committed Jun 26, 2014
1 parent 17aea44 commit 9620559
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion django/contrib/auth/tests/test_auth_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class BaseModelBackendTest(object):
def setUp(self):
self.curr_auth = settings.AUTHENTICATION_BACKENDS
settings.AUTHENTICATION_BACKENDS = (self.backend,)
Group._meta._get_field_map.cache_clear()
Group._meta._get_new_fields_cache = {}
self.create_users()

def tearDown(self):
Expand Down
4 changes: 0 additions & 4 deletions django/db/models/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,6 @@ def add_field(self, field):
# the "creation_counter" attribute of the field.
# Move many-to-many related fields from self.fields into
# self.many_to_many.
if hasattr(self, '_field_map'):
del self._field_map
self._get_new_fields_cache = {}

if field.rel and isinstance(field.rel, ManyToManyRel):
Expand Down Expand Up @@ -355,8 +353,6 @@ def add_field(self, field):
del self._name_map

def add_virtual_field(self, field):
if hasattr(self, '_field_map'):
del self._field_map
self._get_new_fields_cache = {}
self.virtual_fields.append(field)

Expand Down

0 comments on commit 9620559

Please sign in to comment.