# Path: classphoto/models.py
# def _bio2dict( bio_db ):
# def save_bio( email, sequence, name, bio, avatar, twitter=None, gplus=None):
# def has_bio( email, sequence ):
# def get_bio( email ):
# def get_bios( sequence, limit=100 ):
# def get_bios_by_email( sequence, emails ):
# 
# Path: classphoto/db.py
# class UserBio(models.Model):
# 
# Path: classphoto/emails.py
# def send_user_link( email, key ):
# def send_user_link_to_whole_sequence( sequence ):
# def send_group_photos(sequence):
# 
# Path: signup/models.py
# def create_signup( email, questions ):
# def update_signup( email, questions ):
# def create_or_update_signup( email, questions ):
# def delete_signup( email, sequence ):
# def _signup2json( signup_db ):
# def get_signup( email, sequence ):
# def get_all_user_signups( email ):
# def get_signup_by_invite_code( invite_code ):
# def get_signups( sequence ):
# def get_signups_for_archiving( sequence ):
# def get_new_signups( ):
# def handle_new_signups( ):
# def add_user_to_global_list( email, sequence ):


from django.test import TestCase
from mock import patch
from classphoto import models as classphoto_api
from classphoto import db
from classphoto import emails
from signup import models as signup_api
        user_bio = classphoto_api.save_bio(**self.BIO_DATA)
        self.assertEqual(self.BIO_DATA, user_bio)


    def test_save_bio_with_twitter(self):
        bio_data = self.BIO_DATA.copy()
        bio_data['twitter'] = 'testhandle'
        user_bio = classphoto_api.save_bio(**bio_data)
        self.assertEqual(bio_data, user_bio)


    def test_save_bio_with_twitter(self):
        bio_data = self.BIO_DATA.copy()
        bio_data['gplus'] = 'http://plus.google.com/user/1231231231/'
        user_bio = classphoto_api.save_bio(**bio_data)
        self.assertEqual(bio_data, user_bio)


    def test_get_sequence_bios(self):
        for i in range(10):
            data = self.BIO_DATA.copy()
            data['email'] = 'test-{0}@mail.com'.format(i)
            user_bio = classphoto_api.save_bio(**data)

        bios = classphoto_api.get_bios(1)
        self.assertEquals(len(bios), 10)


    def test_get_sequence_bios_by_email(self):
        emails = ['test-{0}@mail.com'.format(i) for i in range(10)]

# Path: classphoto/models.py
# def _bio2dict( bio_db ):
# def save_bio( email, sequence, name, bio, avatar, twitter=None, gplus=None):
# def has_bio( email, sequence ):
# def get_bio( email ):
# def get_bios( sequence, limit=100 ):
# def get_bios_by_email( sequence, emails ):
# 
# Path: classphoto/db.py
# class UserBio(models.Model):
# 
# Path: classphoto/emails.py
# def send_user_link( email, key ):
# def send_user_link_to_whole_sequence( sequence ):
# def send_group_photos(sequence):
# 
# Path: signup/models.py
# def create_signup( email, questions ):
# def update_signup( email, questions ):
# def create_or_update_signup( email, questions ):
# def delete_signup( email, sequence ):
# def _signup2json( signup_db ):
# def get_signup( email, sequence ):
# def get_all_user_signups( email ):
# def get_signup_by_invite_code( invite_code ):
# def get_signups( sequence ):
# def get_signups_for_archiving( sequence ):
# def get_new_signups( ):
# def handle_new_signups( ):
# def add_user_to_global_list( email, sequence ):


# Path: classphoto/tests/test_model.py
from django.test import TestCase
from mock import patch
from classphoto import models as classphoto_api
from classphoto import db
from classphoto import emails
from signup import models as signup_api

        user_bio = classphoto_api.save_bio(**self.BIO_DATA)
        self.assertEqual(self.BIO_DATA, user_bio)


    def test_save_bio_with_twitter(self):
        bio_data = self.BIO_DATA.copy()
        bio_data['twitter'] = 'testhandle'
        user_bio = classphoto_api.save_bio(**bio_data)
        self.assertEqual(bio_data, user_bio)


    def test_save_bio_with_twitter(self):
        bio_data = self.BIO_DATA.copy()
        bio_data['gplus'] = 'http://plus.google.com/user/1231231231/'
        user_bio = classphoto_api.save_bio(**bio_data)
        self.assertEqual(bio_data, user_bio)


    def test_get_sequence_bios(self):
        for i in range(10):
            data = self.BIO_DATA.copy()
            data['email'] = 'test-{0}@mail.com'.format(i)
            user_bio = classphoto_api.save_bio(**data)

        bios = classphoto_api.get_bios(1)
        self.assertEquals(len(bios), 10)


    def test_get_sequence_bios_by_email(self):
        emails = ['test-{0}@mail.com'.format(i) for i in range(10)]

        for email in emails: