Skip to content

Commit

Permalink
Fix path to sample zone file.
Browse files Browse the repository at this point in the history
  • Loading branch information
hhellyer committed Jun 21, 2024
1 parent f34ae29 commit 8688bcb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/unit/test_zone.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ns1.rest.zones
import pytest
import os

try: # Python 3.3 +
import unittest.mock as mock
Expand Down Expand Up @@ -98,7 +99,8 @@ def test_rest_zone_import_file(zones_config, zone, name, url, networks, views):
if name is not None:
params['name'] = name

z.import_file(zone, "../examples/importzone.db", name=name, networks=networks, views=views)
zoneFilePath = "{}/../../examples/importzone.db".format(os.path.dirname(os.path.abspath(__file__)))
z.import_file(zone, zoneFilePath, name=name, networks=networks, views=views)

z._make_request.assert_called_once_with(
"PUT", url, files=mock.ANY, params=params, callback=None, errback=None
Expand Down

0 comments on commit 8688bcb

Please sign in to comment.