Exemplo n.º 1
0
    def test_get_all_one_record(self):
        db_api.security_service_create(self.fake_context,
                                       security_service_dict)

        result = db_api.security_service_get_all(self.fake_context)

        self.assertEqual(len(result), 1)
        self._check_expected_fields(result[0], security_service_dict)
Exemplo n.º 2
0
    def test_get_all_one_record(self):
        db_api.security_service_create(self.fake_context,
                                       security_service_dict)

        result = db_api.security_service_get_all(self.fake_context)

        self.assertEqual(len(result), 1)
        self._check_expected_fields(result[0], security_service_dict)
    def test_get_all_two_records(self):
        dict1 = security_service_dict
        dict2 = security_service_dict.copy()
        dict2['id'] = 'fake id 2'
        db_api.security_service_create(self.fake_context, dict1)
        db_api.security_service_create(self.fake_context, dict2)

        result = db_api.security_service_get_all(self.fake_context)

        self.assertEqual(len(result), 2)
Exemplo n.º 4
0
    def test_get_all_two_records(self):
        dict1 = security_service_dict
        dict2 = security_service_dict.copy()
        dict2['id'] = 'fake id 2'
        db_api.security_service_create(self.fake_context,
                                       dict1)
        db_api.security_service_create(self.fake_context,
                                       dict2)

        result = db_api.security_service_get_all(self.fake_context)

        self.assertEqual(len(result), 2)
Exemplo n.º 5
0
    def test_get_all_no_records(self):
        result = db_api.security_service_get_all(self.fake_context)

        self.assertEqual(len(result), 0)
Exemplo n.º 6
0
    def test_get_all_no_records(self):
        result = db_api.security_service_get_all(self.fake_context)

        self.assertEqual(len(result), 0)