def test_is_site(self): dom = Domain(domain="asdf.com") assert not dom.is_site dom.site = Site(domain=Domain(domain="main.com")) assert not dom.is_site dom.site = Site(domain=dom) assert dom.is_site
def test_aliases(self): d = Domain(domain="test.com") s = Site(domain=d) d.site = s a = Domain(domain="alias.com") s.aliases << a self.clerk.store(s) self.clerk.store(d) s = self.clerk.fetch(Site, ID=1) assert [a] == s.aliases