<commit_before>from django.test import TestCase
from teams.models import Team
from django.utils import timezone
from projects.models import Project, ProjectMembership

class Membership_team_to_member_test(TestCase):
    def setUp(self):
        self.team_name = "Team1"
        self.team_name_2 = "Team2"

        self.team = Team.objects.create_team(
            name = self.team_name
        )

        self.team_2 = Team.objects.create_team(
            name = self.team_name_2
        )

<commit_msg>test project_membership_team_to_project<commit_after>from django.test import TestCase
from teams.models import Team
from django.utils import timezone
from projects.models import Project, ProjectMembership

class Membership_team_to_member_test(TestCase):
    def setUp(self):
        self.team_name = "Team1"
        self.second_team = "Team2"

        self.project_name = "Project1"
        self.second_project = "Project2"

        self.team = Team.objects.create_team(
            name = self.team_name
        )

        self.second_team = Team.objects.create_team(
            name = self.second_team
        )

        self.project = Project.objects.create_project(
            name = self.project_name,
        )
        
        self.second_project = Project.objects.create_project(
            name = self.second_project,
        )
        
        self.project_membership = ProjectMembership.objects.create_project_membership(
            project = self.project,
            team = self.team
        )
        self.project_membership = ProjectMembership.objects.create_project_membership(
            project = self.second_project,
            team = self.team
        )
       
    def test_get_all_project_teams(self):
        self.assertIsNotNone(self.team.project_teams.all())
 
    def test_project_could_get_all_project_teams(self):
        project_teams = self.team.project_teams.all()
        self.assertEqual(project_teams[0], self.project)
        self.assertEqual(project_teams[1], self.second_project)


{'fraction_non_alphanumeric': 0.07790927021696252, 'fraction_numerical': 0.005424063116370809, 'mean_word_length': 2.516464471403813, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6346655', 'n_tokens_mistral': 591, 'n_tokens_neox': 581, 'n_words': 102}