Esempio n. 1
0
    def test_user_dict_no_file(self):
        user = type('User', (object,),
                    {'id': 'bob', 'access': 'foo', 'secret': 'bar'})

        expected_user_dict = {'username': '******',
                              'accesskey': 'foo',
                              'secretkey': 'bar',
                              'file': None}

        self.assertEqual(expected_user_dict, admin.user_dict(user))
Esempio n. 2
0
    def test_user_dict_no_file(self):
        user = type('User', (object, ), {
            'id': 'bob',
            'access': 'foo',
            'secret': 'bar'
        })

        expected_user_dict = {
            'username': '******',
            'accesskey': 'foo',
            'secretkey': 'bar',
            'file': None
        }

        self.assertEqual(expected_user_dict, admin.user_dict(user))
Esempio n. 3
0
 def test_user_dict_no_user(self):
     self.assertEqual({}, admin.user_dict(None))
Esempio n. 4
0
 def test_user_dict_no_user(self):
     self.assertEqual({}, admin.user_dict(None))