Example #1
0
    def set_up_profile(self):
        self.sub_profile = self.adapter(ssn='123456789',
                                        _use_factory=self.factory)
        self.sub_profile = Sub_profile.get(self.sub_profile.meta.id)
        del self.sub_profile.meta.version
        self.sub_profile.meta.id = 'bgc_us_one_validate_123456789'
        self.sub_profile.save()

        self.sub_profile_trace = self.adapter_trace(ssn='123456789',
                                                    first_name='jonh',
                                                    last_name='doe',
                                                    _use_factory=self.factory)
        self.sub_profile_trace = Sub_profile.get(
            self.sub_profile_trace.meta.id)
        del self.sub_profile_trace.meta.version
        self.sub_profile_trace.meta.id = 'bgc_us_one_trace_123456789'
        self.sub_profile_trace.save()

        self.profile = Profile_factory.build()
        self.profile.attach_sub_profiles(
            [self.sub_profile, self.sub_profile_trace])
        self.profile.meta.id = 'sub_profile_12345'
        self.profile.save()

        self.sub_profile_ids = [
            self.sub_profile.meta.id, self.sub_profile_trace.meta.id
        ]
Example #2
0
 def test_build_signatures_should_return_all_subprofiles(self):
     profile = Profile_factory.build()
     sub_profiles, group = self.package.build_signatures(
         profile, {'ssn': '123456789'}, _use_factory='default')
     self.assertIsInstance(sub_profiles, list)
     self.assertTrue(sub_profiles, "no return subprofiles")
     for sub_profile in sub_profiles:
         self.assertIsInstance(sub_profile, Sub_profile_model)
Example #3
0
    def set_up_profile(self):
        self.sub_profile = Sub_profile_factory.build()
        self.sub_profile.meta.id = 'sub_profile_12345'
        self.sub_profile.save()

        self.profile = Profile_factory.build()
        self.profile.attach_sub_profiles([self.sub_profile])
        self.profile.meta.id = 'sub_profile_12345'
        self.profile.save()

        self.sub_profile_ids = [self.sub_profile.meta.id]
Example #4
0
 def test_build_signatures_all_the_sub_profile_have_ids(self):
     profile = Profile_factory.build()
     sub_profiles, group = self.package.build_signatures(
         profile, {'ssn': '123456789'}, _use_factory='default')
     for sub_profile in sub_profiles:
         self.assertTrue(sub_profile.meta.id)
Example #5
0
 def test_build_signatures_the_group_len_should_eq_sub_profiles(self):
     profile = Profile_factory.build()
     sub_profiles, group = self.package.build_signatures(
         profile, {'ssn': '123456789'}, _use_factory='default')
     self.assertEqual(len(sub_profiles), len(group.tasks))