Exemple #1
0
    def setUp(self):
        base.Base.setUp(self)
        db.create_all()
        u0 = user.User(username='******')
        u1 = user.User(username='******')
        oa0 = user.TwitterOAuth(
            user=u0,
            screen_name='twitter0',
            token='token',
            token_secret='token_secret',
            friends=[user.Friend('twitter1', 't1', ''), user.Friend('twitter2', 't2', '')],
        )
        oa1 = user.TwitterOAuth(
            user=u1,
            screen_name='twitter1',
            token='token',
            token_secret='token_secret',
            friends=[user.Friend('twitter2', 't2', '')],
        )
        db.session.add_all([u0, u1, oa0, oa1])
        db.session.commit()
        self.u0 = u0
        self.u1 = u1

        # Register a printer for user so we can test friends printers
        u0.claim_printer('vcty-8s95-40hq-6k1z', 'u0 printer')
        hardware.Printer.phone_home('dd5ebbcce362f584')

        u1.claim_printer('pmo0-bjf1-ste8-51c1', 'u1 printer')
        hardware.Printer.phone_home('35fef3793dce4692')
Exemple #2
0
    def setUp(self):
        base.Base.setUp(self)
        db.create_all()
        u0 = user.User(username='******')
        u1 = user.User(username='******')
        oa0 = user.TwitterOAuth(
            user=u0,
            screen_name='twitter0',
            token='token',
            token_secret='token_secret',
            friends=[
                user.Friend('twitter1', 't1', ''),
                user.Friend('twitter2', 't2', '')
            ],
        )
        oa1 = user.TwitterOAuth(
            user=u1,
            screen_name='twitter1',
            token='token',
            token_secret='token_secret',
            friends=[user.Friend('twitter2', 't2', '')],
        )
        db.session.add_all([u0, u1, oa0, oa1])
        db.session.commit()
        self.u0 = u0
        self.u1 = u1

        # Register a printer for user so we can test friends printers
        u0.claim_printer('vcty-8s95-40hq-6k1z', 'u0 printer')
        hardware.Printer.phone_home('dd5ebbcce362f584')

        u1.claim_printer('pmo0-bjf1-ste8-51c1', 'u1 printer')
        hardware.Printer.phone_home('35fef3793dce4692')
Exemple #3
0
 def setUp(self):
     testing.TestCase.setUp(self)
     db.create_all()
     self.testuser = user.User(username="******",
                               twitter_oauth=user.TwitterOAuth(
                                   screen_name='testuser',
                                   friends=[],
                                   token="token",
                                   token_secret="token_secret",
                               ))
     db.session.add(self.testuser)
     db.session.commit()
Exemple #4
0
 def setUp(self):
     testing.TestCase.setUp(self)
     db.create_all()
     self.testuser = user.User(
         username="******",
         twitter_oauth=user.TwitterOAuth(
             screen_name='testuser',
             friends=[],
             token="token",
             token_secret="token_secret",
         )
     )
     db.session.add(self.testuser)
     db.session.commit()
 def setUp(self):
     testing.TestCase.setUp(self)
     db.create_all()
Exemple #6
0
 def setUp(self):
     testing.TestCase.setUp(self)
     db.create_all()