Exemplo n.º 1
0
    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()])
Exemplo n.º 2
0
    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