from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

#from __future__ import print_function
from .statements import *
nu = datetime.datetime.now()

from rowers.models import User,Rower


@pytest.mark.django_db        
class AdminTests(TestCase):
    def setUp(self):
        u = User.objects.create_user('john',
                                     'sander@ds.ds',
                                     'koeinsloot')
        r = Rower.objects.create(user=u)
        my_admin = User.objects.create_superuser('myuser',
                                                 'myemail@test.com',
                                                 'apensstaart')
        
        self.c = Client()
        self.c.login(username='myuser',password='apensstaart')
        
    def test_admin(self):
        response = self.c.get('/admin',follow=True)
        self.assertEqual(response.status_code,200)
        
        
        response = self.c.get('/admin/auth/user/',follow=True)
        self.assertEqual(response.status_code,200)

        response = self.c.get('/admin/auth/user/77/change/',follow=True)
        self.assertEqual(response.status_code,200)
