def test_put__ns_column_explicitly_set_to_go(self): links.ShortLink(created=datetime.datetime(2018, 10, 1), organization='googs.com', owner=f'*****@*****.**', namespace='go', _ns='go', shortpath='there', shortpath_prefix='there', destination_url='http://example.com').put() self.assertEqual([None], [l._ns for l in links.ShortLink._get_all()])
def _add_link(self, namespace, path, organization='googs.com'): link = links.ShortLink(created=datetime.datetime(2018, 10, 1), organization=organization, owner=f'kay@{organization}', namespace=namespace, shortpath=path, shortpath_prefix=path.split('/')[0], destination_url='http://example.com') link.put() return link