def test_hostnames_list(): """Tests fetching all Hostnames in the database.""" allitems = Hostname.list() assert isinstance(allitems[0], Hostname) assert len(allitems) == 10
def test_hostname_attributes(): """Tests that a created Hostname has all needed attributes.""" allitems = Hostname.list() for hostname in allitems: assert hostname.value.startswith('asd')