def test_check_context_with_empty_context(self):
        with UnittestEdcoreDBConnection() as connection:
            pii = PII(connection, RolesConstants.PII)
            student_ids = []

            context = pii.check_context(self.tenant, self.user, student_ids)
            self.assertTrue(context)
Example #2
0
    def test_check_context_with_empty_context(self):
        with UnittestEdcoreDBConnection() as connection:
            pii = PII(connection, RolesConstants.PII)
            student_ids = []

            context = pii.check_context(self.tenant, self.user, student_ids)
            self.assertTrue(context)
    def test_check_context_with_no_context_to_all_guids(self):
        with UnittestEdcoreDBConnection() as connection:
            pii = PII(connection, RolesConstants.PII)
            student_ids = ['dd', 'e2f3c6a5-e28b-43e8-817b-fc7afed02b9b']

            context = pii.check_context(self.tenant, self.user, student_ids)
            self.assertFalse(context)
Example #4
0
    def test_check_context_with_no_context_to_all_guids(self):
        with UnittestEdcoreDBConnection() as connection:
            pii = PII(connection, RolesConstants.PII)
            student_ids = ['dd', 'e2f3c6a5-e28b-43e8-817b-fc7afed02b9b']

            context = pii.check_context(self.tenant, self.user, student_ids)
            self.assertFalse(context)