@@ -0,0 +1,1891 @@
+from django.test import TestCase%0Afrom projects.models import Project, ProjectMembership, Team%0Afrom django.utils import timezone%0Afrom django.core.exceptions import ValidationError%0A%0Aclass ProjectMembership_test(TestCase):%0A    def setUp(self):%0A        self.project_name = %22Team1%22%0A        self.second_team_name = %22Second Team%22%0A        self.project_name = %22Project1%22%0A        self.second_project_name = %22Second Project%22%0A%0A        self.team = Team.objects.create_team(%0A            name = self.project_name%0A        )%0A%0A        self.second_team = Team.objects.create_team(%0A            name = self.second_team_name%0A        )%0A%0A        self.project = Project.objects.create_project(%0A            name = self.project_name%0A        )%0A%0A        self.second_project = Project.objects.create_project(%0A            name = self.second_project_name%0A        )%0A       %0A        self.project_membership = ProjectMembership.objects.create_project_membership(%0A            project = self.project,%0A            team = self.team,%0A        )%0A%0A# Attribute%0A    def test_project_membership_must_have_date_joined(self):%0A        try:%0A            self.project_membership.date_joined%0A        except AttributeError:%0A            self.fail(%22project_membership should have date_joined%22)%0A%0A# Validation%0A    def test_create_project_membership_project_argument_should_be_User_object(self):%0A        try:%0A            self.project_membership = ProjectMembership.objects.create_project_membership(%0A                project = self.project,%0A                team = self.project,%0A            )%0A        except :%0A            pass%0A%0A    def test_create_project_membership_project_argument_should_be_Team_object(self):%0A        try:%0A            self.project_membership = ProjectMembership.objects.create_project_membership(%0A                project = self.team,%0A                team = self.team,%0A            )%0A        except ValidationError:%0A            pass%0A%0A

test for test_project_membership