Use Member as the Django User model, auth fixes

This commit is contained in:
nikolark committed 2013-10-18 02:03:07 +02:00
1 parent 42e83727dd
commit 4e35307501
16 files changed
+117 -639

No files matched your search

+2 -16
View File
@@ -29,31 +29,17 @@ def test_fixtures():
os.path.join('dusken', 'fixtures', 'institution.json'),
]
def load_test_fixtures():
''' Explicitly load all defined fixtures. This can be useful when
you only want to load the fixtures for some testcases, but not
for all tests in a test class.'''
for f in test_fixtures():
call_command('loaddata', f, verbosity=0)
def test_fixtures_member():
''' Returns a list with the locations of all defined fixtures. '''
return [os.path.join('dusken', 'fixtures', 'country.json'),
return [os.path.join('dusken', 'fixtures', 'member.json'),
os.path.join('dusken', 'fixtures', 'country.json'),
os.path.join('dusken', 'fixtures', 'address.json'),
os.path.join('dusken', 'fixtures', 'institution.json'),
]
def test_fixtures_membership():
return test_fixtures() + [
os.path.join('dusken', 'fixtures', 'users.json'),
os.path.join('dusken', 'fixtures', 'apikey.json'),
os.path.join('dusken', 'fixtures', 'member.json'),
os.path.join('dusken', 'fixtures', 'membershiptype.json'),
os.path.join('dusken', 'fixtures', 'membership.json'),
]
def load_test_fixtures_for_membership():
django.db.models.signals.post_save.disconnect(create_api_key, sender=Member)
print test_fixtures_membership()
for f in test_fixtures_membership():
call_command('loaddata', f, verbosity=0)