Example #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))
Example #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))
Example #3
0
 def test_user_dict_no_user(self):
     self.assertEqual({}, admin.user_dict(None))
Example #4
0
 def test_user_dict_no_user(self):
     self.assertEqual({}, admin.user_dict(None))