'modules should be hidden if module def\'s restrict to domain is not in active domains'

def test_module_def_for_domainification(self):

    test_module_def = frappe.get_doc(u'Module    Def', u'Contacts')
    test_module_def.restrict_to_domain = u'_Test    Domain    2'
    test_module_def.save()
    self.add_active_domain(u'_Test    Domain    2')
    modules = frappe.get_active_modules()
    self.assertTrue((u'Contacts' in modules))
    self.remove_from_active_domains(u'_Test    Domain    2')
    modules = frappe.get_active_modules()
    self.assertTrue((u'Test    Module' not in modules))
