'Course with specific country can be added either as whitelist or blacklist
trying to add with both types will raise error'

def test_unique_together_constraint(self):

    course_id = CourseLocator('abc', '123', 'doremi')
    country = Country.objects.create(country='NZ')
    restricted_course1 = RestrictedCourse.objects.create(course_key=course_id)
    CountryAccessRule.objects.create(restricted_course=restricted_course1, rule_type=CountryAccessRule.WHITELIST_RULE, country=country)
    with self.assertRaises(IntegrityError):
        CountryAccessRule.objects.create(restricted_course=restricted_course1, rule_type=CountryAccessRule.BLACKLIST_RULE, country=country)
