def test_add_domain(self): c = Domain( name = 'com') c.save() f_c = Domain( name = 'foo.com') f_c.save() f_c.save() self.assertTrue( f_c.get_absolute_url() ) self.assertTrue( f_c.get_edit_url() ) self.assertTrue( f_c.get_delete_url() ) self.assertTrue( f_c.master_domain == c) b_c = Domain( name = 'bar.com') b_c.save() self.assertTrue( b_c.master_domain == c) b_b_c = Domain( name = 'baz.bar.com') b_b_c.save() self.assertTrue( b_b_c.master_domain == b_c)
def test1_add_domain(self): c = Domain(name='com') c.save() f_c = Domain(name='foo.com') f_c.save() f_c.save() f_c.details() self.assertTrue(f_c.get_detail_url()) self.assertTrue(f_c.get_update_url()) self.assertTrue(f_c.get_delete_url()) self.assertTrue(f_c.master_domain == c) b_c = Domain(name='bar.com') b_c.save() self.assertTrue(b_c.master_domain == c) b_b_c = Domain(name='baz.bar.com') b_b_c.save() self.assertTrue(b_b_c.master_domain == b_c)