# Cannot import TestMocks to unit test target in cocoapod library

**URL:** <https://community.apollographql.com/t/cannot-import-testmocks-to-unit-test-target-in-cocoapod-library/7381>\
**Category:** Client SDKs\
**Tags:** mobile, ios\
**Created:** [April 13, 2024, 12:49pm UTC](https://community.apollographql.com/t/cannot-import-testmocks-to-unit-test-target-in-cocoapod-library/7381 "2024-04-13T12:49:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahabaleshwar-hegde](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/mahabaleshwar-hegde/32/5016_2.png) [@mahabaleshwar-hegde](https://community.apollographql.com/u/mahabaleshwar-hegde)\
**Post date:** [April 13, 2024, 12:49pm UTC](https://community.apollographql.com/t/cannot-import-testmocks-to-unit-test-target-in-cocoapod-library/7381/1 "2024-04-13T12:49:42Z")

</div>

I am trying to use ApolloTestSupport in unit tests. I want to add generated test models to only unit test target. Generated models doesn’t have `@testable import MyApp.` so cannot use TestMocks.

`apollo-codegen-config.json` output segment looks below.

```auto
"output": {
    "testMocks": { "absolute": {
      "path": "../../Tests/GeneratedAPI/Mocks"
    } 
   },
    "schemaTypes": {
      "path": "./GeneratedAPI",
      "moduleType": { "embeddedInTarget": { "name": "MyApp" } }
    },
    "operations": {
      "inSchemaModule": {}
    }

```

I would like to know how to add test mocks to unit target and keep generated model embedded to source target.
