mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-21 21:59:27 +00:00
Initial import
This commit is contained in:
0
sso/__init__.py
Normal file
0
sso/__init__.py
Normal file
18
sso/models.py
Normal file
18
sso/models.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
from eve_api.models.api_player import EVEAccount
|
||||
|
||||
class UserProfile(User):
|
||||
eveaccount = models.ForeignKey(EVEAccount)
|
||||
|
||||
class Site(models.Model):
|
||||
url = models.CharField(max_length=200)
|
||||
active = models.BooleanField()
|
||||
api = models.CharField(max_length=200)
|
||||
|
||||
class SiteAccount(models.Model):
|
||||
user = models.ForeignKey(UserProfile)
|
||||
site = models.ForeignKey(Site)
|
||||
username = models.CharField(max_length=200)
|
||||
active = models.BooleanField()
|
||||
|
||||
23
sso/tests.py
Normal file
23
sso/tests.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
This file demonstrates two different styles of tests (one doctest and one
|
||||
unittest). These will both pass when you run "manage.py test".
|
||||
|
||||
Replace these with more appropriate tests for your application.
|
||||
"""
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
class SimpleTest(TestCase):
|
||||
def test_basic_addition(self):
|
||||
"""
|
||||
Tests that 1 + 1 always equals 2.
|
||||
"""
|
||||
self.failUnlessEqual(1 + 1, 2)
|
||||
|
||||
__test__ = {"doctest": """
|
||||
Another way to test that 1 + 1 is equal to 2.
|
||||
|
||||
>>> 1 + 1 == 2
|
||||
True
|
||||
"""}
|
||||
|
||||
1
sso/views.py
Normal file
1
sso/views.py
Normal file
@@ -0,0 +1 @@
|
||||
# Create your views here.
|
||||
Reference in New Issue
Block a user