'Join the given TestView QuerySet to TestAttribute.  The resulting query
has an additional column for the given attribute named
"attribute_<attribute name>".'

def _join_test_attribute(self, query_set, attribute, alias=None, extra_join_condition=None):

    if (not alias):
        alias = ('test_attribute_' + attribute)
    attribute_query = TestAttribute.objects.filter(attribute=attribute)
    if extra_join_condition:
        attribute_query = attribute_query.extra(where=[extra_join_condition])
    query_set = Test.objects.join_custom_field(query_set, attribute_query, alias)
    query_set = self._add_select_value(query_set, alias)
    return query_set
